Question
Infosys
IN
Last activity: 19 Sep 2020 9:52 EDT
While saving the PageList pxResults() to DB causing the issue
I am saving the page list values to DB , consider example my Pagelist has 2 results and I want o save 2 results in 2 different rows to DB. I am looping on the PagelList and copying the clipboard values to DB using temporary pagelist of DB class which is defined in Pages and Classes, saving the Pagelist in loop and commiting it to DB.
after doing this its saving only second results to DB its not considering the first results.Could anybody tell me what I need to do fix this issue.
Thanks.
***Edited by Moderator Marissa to update General to Product***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
FR
Hello,
Do you Obj-Open and Obj-Save everytime? Can you share few screen shots maybe.
Updated: 28 Aug 2020 4:43 EDT
Infosys
IN
Thank you for your reply,
No I want to do only set and save , Obj-open is not required as I am not doing any modification on the table.Please find below screenshot FYI
Pegasystems Inc.
FR
oh ok,
I think I would do it differently. I would just loop on your TestList and then Obj-Open and Obj-Save each element
Pega
IN
Hi,
In step 3 after looping in pxResults, add a child steps
- Set the required properties on your page(if needed)
- Obj-Save
Please let me know if this is helpful.
Thanks
Infosys
IN
Hi,
Thank you for your response,
Yeah I am doing Call Save in child step 3, since pega 8.4 giving sever warning for obj-save I am using Call Save.
PS: I tried using Obj-save also but still it's giving the same issue.
Updated: 28 Aug 2020 9:00 EDT
Lantiqx
GB
Hi
Few clarrifications, before commenting anything on this
Is the ID KEY for the class, if yes, is ID same for both records??
Will class support locking??
Thanks
Updated: 28 Aug 2020 10:14 EDT
Infosys
IN
Hi,
Thank you for your response,
Key of the class is pyGUID(Globally unique ID) , yes we have enabled Allow locking option in the class record and in the attached screenshot I have replaced with dummy properties.
Lantiqx
GB
Hi,
If TestDataList is not removed at last step,
After Activity is executed can you please check TestDataList page List has two pages and has two different pyGUID's in two different pages.
Thanks
Krishna
Infosys
IN
Hi Krishna,
Thanks for your response.
In the class we were not enabled the below option:
Automatically generate a unique ID for records of this type, so it was causing the issue, after enabling it activity is working fine.