Policy Exception IntegrationUse case: A user assigned to a problem can choose to defer the fix for the problem. In ServiceNow, each problem can have many incidents. Therefore, a user can request a policy exception for the incident with respect to the problem. This enables a user to request policy exception from the Problem form whereas the actual record for which the policy exception must be created is Incident. Register an application and table with GRC in integration registry Navigate to Policy and Compliance -> Policy Exceptions -> Integration Registry.Enter the information in the required fields such as Name and Policy exception target table in the primary section.In the Entity Mapping section, select the relationship from one of the following options: Reference field: If the field is directly available in the policy exception target table.Related list: If the field is available in a table and that table is related to the policy exception target table. In the Request source section, perform the following steps. This is optional section. Select the table from which you want to request policy exception. Select the relationship as Reference field if Request source table and policy exception target table are directly related.Select the relationship as related field if Request source table and policy exception target table are related with the Mapping table. Restricted caller access privilege: Please provide Restricted caller access privilege for all required tables from Script Include: PolicyExceptionBase and source scope GRC: Policy and Compliance Management. See the following example of Problem incident registration: Problem – Request source table.Incident – Policy exception target table.Entity Mapping section - Configuration item field in the incident is entity and related with reference field.Request source section – Incident has a Problem field which maps to the Request source table. Create a UI action “Request policy exception” Mark UI action as client callable.Select the Show on update check box.Select the Form button check box. In Onclick text field write popupDispList() function call.Apply any condition on conditions box as per your requirements. 7. Enter the following code for UI action. The argument for createPolicyException function varies based on the integration. function popupDispList(){ ScriptLoader.getScripts(['sn_compliance.PolicyExceptionUtils.jsdbx'], function() { sn_compliance.PolicyExceptionUtils.createPolicyException('incident'); }); } View the list of policy exception target records on policy exception form Create a new view for your application.Navigate to System Definition -> Relationships -> New.In the Applies to table field select Policy exception from the drop-down list. Queries from the table are either Policy exception target table or Request source mapping table if the relationship type is Related list in the request source section.For sn_compliance.PolicyException().refineQuery function the second argument is the policy exception target table name.Add this related list to your view defined in step 1. (function refineQuery(current, parent) { new sn_compliance.PolicyException().refineQuery(current,parent,'incident'); })(current, parent); Track policy exception from Request source table Create a relationship.Navigate to System Definition -> Relationships -> New.Applies to table is the request source table.In the Queries from table field, select Policy exception from the drop-down list. (function refineQuery(current, parent) { current.addQuery('source_record', parent.getUniqueValue()); })(current, parent);