Questions tagged [executioncontext]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
18
votes
2answers
8k 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 ...
6
votes
3answers
2k 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 ...
5
votes
1answer
887 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 ...
1
vote
3answers
399 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 ...
5
votes
0answers
410 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....
0
votes
1answer
104 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 ...