The extension point for field-level auditing
You can override the extension point for field-level auditing to facilitate reporting. For example, you can include the index keys of the audited properties in the audit table.
To learn how you can benefit from modifying the extension point for field-level auditing, see the following article with a sample use case:
Displaying the index keys of properties in the field-level auditing layout
Increase the readability of the field-level auditing layout by adding a column that displays the index keys of your audited properties of the Page List and Page Group types. When you expose the index column inside the section that is displayed for a property of the Page List and Page Group type, you can differentiate between the list items more conveniently.
- Create and configure a property to represent the key of audited
properties:
- Create a property with the IndexKey name and of
the Text date type in the FLAudit- class in any of
the application rulesets.For more information, see Properties, More about Properties, and Configuring page, page group, and page list properties.
- On the new property form, in the Additional configuration options section, select the Optimize for reporting and Optimize for reporting on descendant classes checkboxes.
For more information, see Optimize a property from the user interface and the Optimizing properties for report performance challenge on Pega Academy. - Create a property with the IndexKey name and of
the Text date type in the FLAudit- class in any of
the application rulesets.
- Override an extension activity to set the IndexKey
property:
- Expand the Technical category, and then click Activity.
- Find and open the pySave activity from the FLAudit- class.
- On the activity form, click Save As.
- On the new activity form, in the Apply to (class) field, select the class that you created for the case type in the FLAudit- class.
- In the Add to ruleset field, select the application ruleset that contains the selected class.
- Click Create and open.
- On the Steps tab, in the
Method field, select a method, and then click
Expand to see method parameters.The activity references Param.ContextPage as the work page and the FLA record as the step page.
- Click Save.
- Override a report definition that derives records from the
FLAudit table:
- Expand the Reports category, and then click Report Definition.
- Find and open the pyGetRecordsByContext report definition from the FLAudit- class.
- On the report definition form, click Save As.
- On the new report definition form, in the Apply to (class) field, select the class that you created for the case type in the FLAudit- class.
- In the Add to ruleset field, select the application ruleset that contains the selected class.
- Click Create and open.
- On the Query tab, click Add column, and then in the Column source field, enter .IndexKey.
- Click Save.
- Include the new property in the table section that displays the FLA
records:
- Expand the User Interface category, and then click Section.
- Find and open the pyFieldGroupHistory section from the @baseclass class.
- On the section form, click Save As.
- On the new section form, in the Apply to (class) field, select the class that you created for the case type in the FLAudit- class.
- In the Add to ruleset field, select the application ruleset that contains the selected class.
- Click Create and open.
- On the Design tab, in the table area, click a table column, and then click Insert column after selected or Insert column before selected.
- Next to the new column's label area, click View properties, and then, in the Cell properties pane, in the Value field, provide the name for the column. For example, enter key.
- Click Submit.
- Next to the new column's field area, click View properties, and then, in the Cell properties pane, in the Property field, enter .IndexKey.
- Click Submit.
Previous topic Packaging rules and data that contain field-level auditing information Next topic Sharing data between parent and child cases