Salesforce

System and User Events (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

System and User Events (Magic xpa 3.x)

For System and User events, where a given Event handler will execute depends on where the operations within it execute. Let's take a look at a simple example.

Neutral-side

Here is an Event handler that can execute on either side. Such a handler is considered Neutral. It will execute wherever it was called from, without the need for communication with the other side. There is no character next to Event header line. The Update operation is considered Neutral also. It can execute on either side.

Client-side

Now, if a Verify operation is added, the Event handler becomes client-side, and is marked with a "C". This is because the Verify operation can only execute on the client, since it needs to give a message to the end user. The Update operation is still Neutral and will execute wherever it was called from. If the Verify operation needs to be executed (i.e. if the Condition on the Verify operation evaluates to TRUE) then the Verify operation will be executed on the client.

If a Call Program to a Batch task is added instead, the Event handler becomes server-side, and is marked with an "S". This is because Batch tasks always execute on the server.

Mixed-side

But what happens if the two are mixed? If client-side and server-side operations are both used, the event is considered Mixed and is marked with an "M". Mixed operations are to be avoided when possible, because the communication between the client and server will make the task run more slowly.

Unknown-side

With some operations, it is impossible to know where the execution will take place. This Raise Event operation, for example, may be handled in this task, in a parent task, in the Main program, or even in a component.

Reference
Attachment 
Attachment