Questions tagged [executioncontext]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
24 votes
4 answers
14k views

Dynamically Determine Calling Context?

We have various ways of invoking apex. Triggers, Inbound Webservices, @InvocableMethod,@RemoteAction and what not. Often we call some or other utility methods from these execution contexts. I have ...
Pranay Jaiswal's user avatar
7 votes
3 answers
3k views

Can future execution start before the synchronous execution is completed

Is there a way for @future annotated method to start execution before the synchronous request which invokes it has completed. In other words, do I have some guarantees that the timing will look like ...
ipavlic's user avatar
  • 3,694
5 votes
1 answer
1k views

Are static variables reset per batch during bulk DML operation? (Executing triggers for field updates)

A while back I had a trigger issue where I needed a trigger operation to execute exclusively on the second update or an update after an insert. So I had some code like this: Trigger Handler Class ...
Programmable Medley's user avatar
3 votes
2 answers
1k views

Can I force a unit test to wait for a Sharing Rule to be created?

Ideally, I'd like to write a unit test to help me "dummy check" for unexpected effects of the upcoming guest user sharing setting changes. We'd had some controller/trigger code "gracefully handling" ...
k..'s user avatar
  • 1,197
6 votes
0 answers
704 views

Can we detect context inside a Lightning Component which has implemented 'force:lightningQuickAction' interface?

While working on a Lightning Component that can be invoked inside a Lightning Record Home Page as well as Quick Actions. But I need to present different User interface in both context of the component....
VarunC's user avatar
  • 5,940
1 vote
3 answers
636 views

How are records batched from Time-Based Workflow updates

Wonder how Salesforce handles batching records in relation to execution context. For example, if I have a static variable that tracks the records being processed by a trigger: trigger MyTrigger on ...
NSjonas's user avatar
  • 10.1k
0 votes
1 answer
168 views

Execution Context Variable Scope In The Tidy Trigger Pattern

I've read through Nuances of Working with Tidy Trigger Pattern, but I'm still struggling to understand something: For what portion of the life of the "execution context" does an attribute of the ...
k..'s user avatar
  • 1,197