#pega
ฝัง
- เผยแพร่เมื่อ 23 ม.ค. 2025
- Today lets discuss Update/modify a case or a record in Pega.
Previously I have told you that pzInsKey is the key property for any record in the database table.
In Pega we have activity methods like
1. Obj-Open-By-Handle
2. Obj-Open
3. Obj-Browse
1. Opj-Open-By-Handle
This method is used for opening a record using pzInsKey of a record.
2. Obj-Open
This method is used to open a record using primary keys defined in the table.
3. Obj-Browse
This method is used to retrieve all the records in the table based on some conditions if required.
Lets discuss them one by one.
Let me created an activity first.
Now take any pzInsKey.
I will goto App explorer--Click on the case type class in this case our class is Quote class.
Here I am seeing all the instances of Quote work class which are stored in the work table which I shown you in my previous session.
Lets click on any of the case and see the details in the clipboard.
See I clicked on the pyWorkPage in the clipboard as I said all the caserelated information stored in pyWorkPage in clipboard.
Now lets find pzInsKey
I have taken a case which has all the data this particular case has more information.
Here I am making this activity as parameterised, since I want to pass the pzInsKey value multiple times with different pzInsKey values.
Whenever you are using Obj-Open-By-Handle don't forget to handle jump transition
this is for exception handling.
Now lets test this activity by passing the pzInsKey and also trace this activity.
Now we have successfully opened a record using Obj-Open-By-Handle method in activity.
Lets check the data opened in the tracer
See here we have opened the pzInsKey which we copied from clipboard.
All details we have now.
Lets update PolicyHolder Details
Here I am just changing the first name and last name.
Lets save this record using Obj-Save
Here if you obseve or not steppage is blank.
This means whenever you open any record in this activity it will replace the steppage with opened record page data.
If you want any named page we can add it pages&classes tab. Lets do that.
In step 4 we have used commit method.
This is not at all required if you are calling this activity within a flow.
But when you are running externally any activity which needs a commit
in your activity if you have more than 1 Obj-Save method, then you can call single commit.
Or if you have only one single Obj-Save
you can use Obj-Save parameters like
WriteNow
WithErrors
OnlyIfNew
But ideally pega won't recommond you to use either of both.
In our development we use alternative ways for this.
For Obj-Save methods also we should specify transition and jump. otherwise it would be very difficult to manage root cause for any issues.
Now see the details has been updated.
See the details has updated.
Like this we update the data.
Thank you for watching my video.
You will learn in my next video
1. Obj-Open
2. Obj-Browse
Thank you for watching.
If you have any questions please comment below.
Please like and subscribe to my channel.
You can follow my most updated knowledge
sharing on my Facebook page.
Facebook: / balupatuvardhanam
Please like and subscribe to my channel
Pega, PRPC, BPM, PegaPortal, Pega Portal
Pega tutorial for beginners
Pega Training videos
Pega Training for beginners
Pega Tutorial videos
#pegatraining #pegandomestresolo #pegacode #lowcodeplatform #lowcodenocode
At 29:51, even after refreshing the name was not updated
But immediately, We are able to see the correct values in the clipboard
Can you please explain this?
I tried recreating this but values are not getting updated in clipboard
can we use this update case activity to reference in the service rest put operation to do the update case using postman
You can
Thank you very much for you work.. you video is helpful for beginners to code in Pega.. Looking forward for more videos..
could you run this from baseclass (you're not in an assignment already) and just add a step page in work class?