I want to updated Opened by users correctly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
My requirement is :
Update requests CITs to reflect correct associate.
Currently, any Cloud task created is showing the original requestor's name instead of the actual creator's name. I want it to correctly display the name of the person who created the CIT in the 'Opened by user' field
Opened by : u_intake.opened_by
Existing Record producer Script :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @JVINAY
Right now, even though you updated your script with current.opened_by = gs.getUserID();, it still shows the original requestor’s name.
This usually happens because:
1. The opened_by field on current might be overridden later (e.g., by a Business Rule, Flow, or Script Include).
2. The field on the parent (u_intake.opened_by) might be used to populate the CIT instead of your manual assignment.
May you try forcing the assignment after setting the parent (to avoid overwrite from copying logic).
producer.portal_redirect = "?id=cloud_request&table=u_cloud_intake_request&view=portal_view&sys_id=" + producer.u_intake.sys_id;
current.parent = producer.u_intake;
current.u_cloud_task_type = 'Review';
current.short_description = 'CIR Requestor change request';
// Force Opened By to current user (creator)
current.opened_by = gs.getUserID();
// Do NOT overwrite the parent record’s opened_by
// producer.u_intake.opened_by = gs.getUserID(); <-- remove this line
current.assignment_group = '1a527886dbe9bb40ee5c24f40596194d';
current.description = "Please work on the change of CIR requestor to " +
producer.please_select_new_requestor.getDisplayValue() +
" as per the justification : " +
producer.please_provide_reason_for_change +
" given by " +
producer.recipient.getDisplayValue();
current.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I have updated the Code:
Still not working,
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @JVINAY ,
try this
producer.portal_redirect = "?id=cloud_request&table=u_cloud_intake_request&view=portal_view&sys_id=" + producer.u_intake;
current.parent = producer.u_intake;
current.u_cloud_task_type = 'Review';
current.short_description = 'CIR Requestor change request';
// added backend name
current.opened_by = gs.getUserID();
current.assignment_group = '1a527886dbe9bb40ee5c24f40596194d';
current.description = "Please work on the change of CIR requestor to " + producer.please_select_new_requestor.getDisplayValue() + " as per the justification : " + producer.please_provide_reason_for_change + " given by " + producer.recipient.getDisplayValue();
var intakeGr = new GlideRecord('u_cloud_intake_request');
if (intakeGr.get(producer.u_intake)) {
intakeGr.opened_by = gs.getUserID();
intakeGr.update();
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya