Requiremetn on the UI action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2024 10:39 AM
Hi Experts
I have the requirement on the UI Action on my Incident form. I have to create the button on the incident form "Create Request" Once I click on the create request button it should creates the request under the Incident form.
Thanks in advance.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2024 12:03 PM
You can use below code in your UI Action on Incident table
var grReq = new GlideRecord('sc_request');
grReq.initialize();
grReq.parent = current.sys_id;
grReq.requested_for = current.caller_id;
grReq.opened_by = gs.getUserID();
grReq.short_description = current.short_description;
grReq.insert();
Other way is, you already have Create request UI Action on incident table which is configured for Form context menu. You can enabled same for form button if required, else you can use above code in your new UI Action script.
This will definitely helps you to resolved your issue. Let me know in case you need to understand the flow or you can DM on LinkedIn.
If this solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.
Best Regards,
Krushna Birla