Populate a field value from a control record to an assessment instance question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
ServiceNow GRC - Populate Assessment Instance Questions from Control Fields and Complete Attestation Programmatically
Hi Experts,
I have a requirement in ServiceNow IRM/GRC Compliance module and would like guidance on the best approach.
Existing OOTB Process
User opens a Control record (sn_compliance_control).
User clicks the Attest button.
An Assessment Instance (asmt_assessment_instance) is opened.
User clicks Take Assessment.
A popup appears with attestation questions.
After submission, answers are stored in Assessment records and the Assessment Instance moves from Ready to take to Complete.
The Control then moves to the next stage/state.
New Requirement
The client does not want users to navigate to the Assessment popup.
Instead, we have created custom fields directly on the Control form and users will answer the attestation questions there.
The custom fields are displayed only during the attestation stage.
Custom Fields on Control (sn_compliance_control)
u_is_control_implemented
u_attach_evidence
u_explain
These correspond to the assessment questions:
Is the Control Implemented?
Attach Evidence
Explain
Assessment Tables Involved
Assessment Instance:
asmt_assessment_instance
Assessment Questions:
asmt_assessment_instance_question
I can see that the Assessment Instance Questions table contains records for the above questions and fields such as:
Metric
String value
Reference ID
Additional Information
The Assessment Instance is initially in state Ready to take and becomes Complete after a normal assessment submission.
What I Need
When the user clicks the Attest UI Action on the Control:
Find the currently attached Assessment Instance for that Control which is in Ready to take state.
Copy values from the Control fields into the corresponding records in asmt_assessment_instance_question.
Complete the Assessment Instance programmatically.
Move the Control to the next state.
Any guidance or sample implementation would be greatly appreciated.
Thank you.