Question
2
Replies
2504
Views
Sberbank
Posted: October 10, 2017
Last activity: October 11, 2017
How to properly update a lot of Work objects in an activity?
I want to update thousands of objects inside an activity.
The algorithm is quite simple:
Iterate the list of Pages
1) Object-Browse by some unique value. Set the "pzInsKey".
2) Obj-Open-By-Handle with "pzInsKey", Lock = true, ReleaseOnCommit = true
3) Set some values
4) Obj-Save
5) Commit
Are the any more simple and safe approaches to perform the algorithm?
The below points need to take care.
1. For each execution try to execute fixed limited no of WO. The no of work objects to update should be as input parameter.
2. You should have an exception handling which will let you know that which work object couldn't update. what is the reason.
3. Error WO should not be pulled again for your execution.