Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 3
    That covers the first sentence of my answer! :) Commented Jul 13, 2016 at 5:48
  • 1
    wow. lots of information here. Commented Jul 13, 2016 at 6:05
  • 1
    I agree with you. I ask something that pollute the generic concept. But was looking for some solution that would help me customize and go live as quick as possible. Methods being context aware helps in creating dynamic apps with dynamic run time behavior. ApexPages.currentPage() and Rest Context will help me here to fulfill my requirement to an extent. Thanks for sharing amazing information here.. Commented Jul 13, 2016 at 6:06
  • 2
    Another one: Url.getCurrentRequestUrl() can identify native UI, Bulk API context etc Commented Jul 9, 2017 at 19:51
  • 5
    This is much easier starting with Winter 21 release thanks to Detect Apex Runtime Context with RequestId and Quiddity Commented Sep 4, 2020 at 23:07