Adding fields while creating cases in DX API v2
Define the initial fields that users see when they create new cases in your DX API-based application by configuring the appropriate data transform in Pega Platform. For example, you can specify that new loan cases include fields that capture account details.
You can add the following elements to new cases:
- Scalar properties
- Embedded pages (including properties)
- Page lists (including properties)
- Page group (including properties) – not recommended
- Attachments
In this scenario, you configure a loan request that captures the user's account details, transaction value, and includes an attachment. You create a data transform and configure it with the appropriate properties. When the data transform runs, it generates a page of your chosen class that includes the properties (without the values).
- In the header of Dev Studio, click .
- Name the transform AllowedStartingFields.
- On the Definition tab of the data transform, clear the Call superclass data transform check box.
- Add scalar properties:
- In the first row, in the Target field enter .pyDescription and in the Source field, enter "".
- In the second row, in the Target field enter .pyLabel and in the Source field, enter "".
See the following figure for reference: - Add page properties:
- Add a row with the Update Page action, and then, in the Target field, enter .AccountDetails.
- Add a child row, and then set .ID to "".
- Add a second child row, and then set .Startdate to "".
See the following figure for reference: - Add page list properties:
- Add a row with the Append and Map to action, and then, in the Target field, enter .Transactions.
- Add a child row, and then set .Amount to "".
- Add a second child row, and then set .ToAccount to "".
See the following figure for reference: - (Not recommended) Add page group properties:
- Add a row with the Update Page action, and then,
in the Target field, enter
.LocationDetails(HOME).(HOME) is a sample subscript for the LocationDetails page group.
- Add a child row, and then set .Latitude to "".
- Add a second child row, and then set .Longitude to "".
See the following figure for reference: - Add a row with the Update Page action, and then,
in the Target field, enter
.LocationDetails(HOME).
- Add attachment properties:
- Add a row with the Update Page action, and then, in the Target field, enter .Itinerary.
- Remove the default child row.
See the following figure for reference:
Previous topic DX API Version 2 Next topic Attachment management with DX API v2