- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 01:28 AM
Hello good day,
How I can create another RITM when checkbox is true? So this catalog variable (checkbox) is only visible in variable editor, so when the fulfiller check the checkbox it will generate another RITM. How I can do it in flow designer? Any idea will be appreciated.
Thank you so much.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 01:37 AM
Hi @jeansky ,
You can do this in multiple ways you can make use of your existing workflow or flow / create a busness rule.
if its workflow you can create a wait for conditon untill the check box is to true. if its true you can run the below script to create a RITM.
or you can create a business rule to create a rimt and relate it to existing request.
(function executeRule(current, previous /*null when async*/) {
// Check if the checkbox variable is true
if (current.checkbox_variable == true) {
var newRITM = new GlideRecord('sc_req_item');
newRITM.initialize();
newRITM.request = current.request;
newRITM.cat_item = current.cat_item;
newRITM.requested_for = current.requested_for;
newRITM.assignment_group = current.assignment_group;
newRITM.insert(); // Insert the new RITM record
}
})(current, previous);
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 01:46 AM
Hi @jeansky ,
You can also make use of Cart API to create a new RITM in your script.
Please mark helpful/correct if my response helped you.