Update assigned to field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 02:13 AM - edited 09-03-2024 02:27 AM
Hi,
Control owner field is on Control(sn_compliance_control) table. Assigned To and Evidence Execution fields on Control Executor(sn_audit_control_compliance) table. If we select control owner, assigned to have update, Only for Evidence Execution field is Manual. Wrote a script but it is not updating the assigned to field. Any help!
Table : control[sn_compliance_control]
After(Insert,Update) business rule
Condition : Control owner changes
Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 02:23 AM
Hi,
Can you add any log to see if the script is coming on the if condition of GlideRecord?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 02:39 AM
@Shaik22 Can you try the following and see if it works.
var controlGR = new GlideRecord('sn_audit_control_execution');
controlGR.addQuery('u_evidence_execution', 'Manual');
controlGR.query();
if (controlGR.next()) {
controlGR.assigned_to = current.getValue('u_control_owner');
controlGR.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 02:51 AM
Hi @Shaik22 ,
In the below script is your addquery correct ? check the backend value of Manual, and try to put some log inside if and put current.u_control_owner in gs.info so that you will get to know what it is fetching..please share the logs screenshot
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 03:01 AM - edited 09-03-2024 03:01 AM
How to put log? and where should i put log?