I want to update the Opened by user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 3 weeks ago
Hi Team ,
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
4 weeks ago
@JVINAY ,
Try the below updated script -
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';
// Set opened_by to the logged-in user instead of CIR requestor
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 " + gs.getUserDisplayName();
Hope it helps!
Shashank Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Thanks for your response
It's working, but I want to update the 'Opened by' field (U_intake_opened_by) as well.
The 'Opened by' user details are showing correctly in the Notes section, but in the 'Opened by' field, it still shows the CIR requestor's name. Could you please help me update the code?
Thanks for support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@JVINAY you can map the field as per my comment above, it would be no code
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@JVINAY ,
Try this updated code for (U_intake_opened_by) field.
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';
// Set both Opened by fields
current.opened_by = gs.getUserID(); // OOTB Opened by
current.u_intake_opened_by = gs.getUserID(); // Custom Opened by
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 " + gs.getUserDisplayName();
If the response was helpful, could you please mark both the solutions as accepted. That will be much appreciated.
Thank you!
Shashank Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
This line not working :
current.u_intake_opened_by = gs.getUserID(); // Custom Opened by
Code is not working Showing Opened by field incorrectly. This is showing CIR requestor instead of CIT Requestor.
Ex :
I created the CIT, but the 'Opened by' field is incorrectly showing the original CIR requestor's name instead of mine
Please help me to update the code or any other solution.
Thank you