Obj-Refresh-And-Lock not functioning properly
After Work Object was modified by a service call which updated the changes using Obj-save, Obj-Refresh-And-Lock will not load latest Work Object details. Latest state is not loaded from the database, and stale information (already present on clipboard is used).
There are no Error Message
Steps to Reproduce
Obj-refresh-And-Lock checks on pxUpdateDateTime of the Work Object and if it is older than the value in database, it reloads the contents. Obj-Save however will not update the pxUpdateDateTime while saving the contents to database.
To ensure the correct update time is saved to DB during any change, Work-.RecalculateAndSave is recommended. This is used in internal Flow processing by Pega.
Perform the following local-change:
Use Work-.RecalculateAndSave instead of Obj-Save and in this case the pxUpdateDateTime will also be updated, and Obj-Refresh-And-Lock will work as expected.
Published January 31, 2016 - Updated October 8, 2020
Was this useful?
100% found this useful
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.