Pages

Wednesday 28 February 2018

Fetch Single Record from Database Table using PEGA PRPC


Part 1: Create two sections
first section will ask user to enter username
second section will display user details
Create activity will fetch the data from the database using the username provided in section 1




Part 2: create a flow and configure sections and activity and test the flow.




Here in the Classes and Pages configuration you need to use primary as reference for the Data class and any user-defined name to Work Class.
Step1: You need to use Object-open method to fetch the single object from DB. In the parameters, you need to select the data class and need to provide primary key property name.
You need to use Work class reference in steps page to debug

Step2: You need to use property set method to map values from Data class to Work class. You need to use Work class reference in the steps. In the parameters, you can map the Data class properties in Properties name and Work class properties in properties values.

Note: To insert and retrieve single object you need to write the activity in Work class side only.


3 comments: