Salesforce

Transaction Mode (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Transaction Mode (Magic xpa 4.x)

The Transaction Modes you can use in a Rich Client task are:

None – Transaction Mode = None is exactly what it sounds like. No transaction is opened. You should use this on tasks that do not save any data, to prevent accidentally opening a transaction "wrapper" that might bundle transactions in a child task. This is especially true if you are creating a main background screen or when creating a background frame.

New Deferred – When the Transaction mode is New deferred, a new transaction is opened whether or not a transaction is opened in the parent task. The child transaction is committed at the child level, regardless of what happens in the parent transaction. If a transaction begins, then:

  • A new Deferred transaction will begin.

  • Any changes made in this transaction will be committed after the transaction is closed (regardless of the caller transaction).

  • The caller transaction can be closed even if this transaction is still open. Closing the caller transaction will not affect this transaction.

  • New transactions will have their own transaction cache. The transaction cache will not be shared among them, and any changes made in one transaction will not be seen in the other transactions.

Within Active Deferred – When the Transaction mode is Within Active, then this transaction becomes part of the parent's transaction (if any):

  • If a transaction is already opened, then the task will be part of that transaction.

  • If a transaction is not opened, then a new deferred transaction will begin.

If the parent task's transaction is rolled back, then the child's transactions will also be rolled back.

This should be used with care, because it is possible for one parent task to have many transactions open in child tasks, all being saved up. Unless there is a good reason to roll back more than one task level at a time, New Deferred is safer.

Related Topics

Reference
Attachment 
Attachment