Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Getting Old data in Declar Trigger Activity



When retrieving data from a database using Obj-Open as part of a Declare Trigger activity (Committed Save), the Obj-Open displays the updated data instead of the old record.

Error Messages

Not Applicable

Steps to Reproduce

  1. Create a Declare Trigger activity on a specific class with the below configuration

    Trigger when an instance is, Committed Save

  2. Configure an activity.
  3. Use the Obj-Open of the Record on any page (for example: OldPage) during the Trigger activity.
  4. Create a sample activity to invoke the trigger,

    a. Open any Class instance where the trigger is created.
    b. Set or update any property with the New Value

        For example, pyLable = 'NewData' assuming pyLable was set with 'OldDateupfront.

    c. Perform ObjSave and a Commit.

  5. Trace the Trigger activity (created in Step 2) while executing the Sample activity. Check the Primary page of the Trigger activity and the Obj-Open page in the Trigger activity (OldPage). Both the OldPage and the Primary Page of the trigger activity have the same data.

    The Obj Open page must have Old data, (OldPage) pyLable=OldData; while the Primary Page must have New data, pyLable = NewData.

Root Cause

This behavior is as per Pega product design.

The Save type declare trigger executes before the page is added to the Deferred Operations List (DOL). That is, the work object is not added to the DOL during trigger execution. Therefore, the Obj-Open returns data from the database.


Here's the explanation for the reported behavior:

Obj-Open does not always fetch the work object from the database. It first checks if the work object is available in the DOL. If it is present, it returns the work object from the DOL instead of the database. In this case, since the work object is saved, it is available in the DOL with current changes. Hence, Obj-Open returns the work object with the current data.

Published August 15, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us