Adding a Case History Entry with a Declare OnChange Rule
September 15, 2021
How can we add an entry to the Case history content table using a Declare OnChange rule.
First: We will add section CaseHistoryWrapper to the pyCaseMainInner
In CasehistoryWrapper we have 2 tabs: CaseHistory which holds our custom Case History table and pyCaseHistoryContent which holds the OOTB ‘Aduti Details’ tab.
- Case history class & db table
- Declare onChange class & rule inheritance
Other methds to add case history entry:
- AddHistory OOTB activty
- Case settings field level auditing
- Declare trigger
Modify FilterHistory Declare trigger and Application Setting to filter history entry adds.
Rules we will need to create:
- Declare onCahnge
- Activity of type onChange
- When rule
- Field Value
Steps:
- create Declare onChange
- Add properties to watch
- Keep in mind, the onChange Activity fires only once if tracking multiple properties.
- Add onChange activity to trigger when tracked property changes.
- Declare onChange rules track and are triggered when the properties in the when condition change.
- Move the when rule to the activity itself.
- Create When rule to check stage or step, this will be used in the activity step’s when field.
- Add properties to watch
Written by Andy Martinez, I wirte about Pega, Front End technologies and whatever I find interesting at the moment. Welcome to my thoughts. Follow me on Twitter