GRC privacy management assign privacy assessment task to the user who opened the processing activity

Rohit Reddy
Tera Contributor

In GRC privacy management, we have a requirement to assign a privacy assessment task to the user who opened the processing activity once the processing activity moves from New state to Discover state.

 

Please provide the solution on this.

1 ACCEPTED SOLUTION

Mahesh Baraskar
Mega Guru

@Rohit Reddy 

 

Write after/async business rule on processing activity table and the condition in the business rule will be State changes to Discover.

 

Write below script in it.

var grAssessment = new GlideRecord('sn_privacy_privacy_task');
    grAssessment.addQuery('processing_activity', current.sys_id);
    grAssessment.addQuery('assigned_to', current.opened_by);
    grAssessment.query();
    if(!grAssessment.next()){
    grAssessment.initialize();
    grAssessment.setValue('assigned_to', current.opened_by);
    grAssessment.short_description = "Auto generated for processing activity: "+ current.number;
    grAssessment.setValue('assessment_template', '6bdea7a6477f4550a35fa852736d43ba');
    grAssessment.setValue('processing_activity', current.sys_id);
    grAssessment.setValue('state', '10');
    grAssessment.setValue('due_date', gdt);
    grAssessment.setValue('source_table', 'sn_grc_profile');
    grAssessment.setValue('source', current.entity);
    grAssessment.insert();
    }
 
Please mark it as correct and helpful if it solves your issue.

View solution in original post

1 REPLY 1

Mahesh Baraskar
Mega Guru

@Rohit Reddy 

 

Write after/async business rule on processing activity table and the condition in the business rule will be State changes to Discover.

 

Write below script in it.

var grAssessment = new GlideRecord('sn_privacy_privacy_task');
    grAssessment.addQuery('processing_activity', current.sys_id);
    grAssessment.addQuery('assigned_to', current.opened_by);
    grAssessment.query();
    if(!grAssessment.next()){
    grAssessment.initialize();
    grAssessment.setValue('assigned_to', current.opened_by);
    grAssessment.short_description = "Auto generated for processing activity: "+ current.number;
    grAssessment.setValue('assessment_template', '6bdea7a6477f4550a35fa852736d43ba');
    grAssessment.setValue('processing_activity', current.sys_id);
    grAssessment.setValue('state', '10');
    grAssessment.setValue('due_date', gdt);
    grAssessment.setValue('source_table', 'sn_grc_profile');
    grAssessment.setValue('source', current.entity);
    grAssessment.insert();
    }
 
Please mark it as correct and helpful if it solves your issue.