- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2019 12:53 AM
When staff leave, how can we bulk change the respondents on the attestations assigned to them?
I tried using the below script, but it does nothing unfortunately (even though it gives me a long list of re-assigned, it doesn't actually reassign):
var actualRespondentsSysID = '(currentusersys_id)';
var newRespondentsSysID = 'newusersys_id';
var gr = new GlideRecord('sn_compliance_control');
gr.addQuery('Respondents', actualRespondentsSysID);
gr.addQuery('state!=retired');
gr.query();
while (gr.next()) {
gr.Respondents = newRespondentsSysID;
gs.info('Control Attestation ' + gr.number + ' re-assigned');
gr.setWorkflow(false); // Optional: Do not run any other business rules (can only be executed in Global scope)
gr.update();
}
I can export the xml and replace the <respondents>SYID</respondents> then re-import, I've tested this but this isn't ideal if a user leaves who is the owner and attestation respondent to a lot of controls...
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2019 04:45 AM
The proper step is to cancel any existing attestations and recreate them with the correct respondents (using out of box processes). Assuming that the Attestation respondents is the Profile Owner (Entity Owner), and thus the Control Owner, use the following steps:
1. find the Profile (Entity) this person own, uncheck "active", then "update", this will retire all related records (include cancel all outstanding Attestations)
2. Change the owner of the Profile (Entity) to the right person, check "active" again, update, this will set Contorl(s) in "draft" mode
3. bulk change the owner of the control(s) to the right owner
4. bulk change the control(s) status to "Attest", new Attestations will be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2019 03:03 AM
I understand properly now (sorry Jing!)
-(include cancel all outstanding Attestations). I was reading this as cancel all attestations.
Thanks all!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2020 07:52 PM
If the attestation is in attest, why should you not go in to it and reassign ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2020 12:38 AM
Hi Meehan, There's no issues with reassigning a single attention, this is regarding the nominated respondents for future attestations, once the existing nominated user moves roles or leaves. You can't change the attestation respondent in a control when it's in state Attest. Best, Lj