- 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:33 AM
Hi,
Please check this out -> Create RITMs for existing request through Flow Des... - ServiceNow Community
- 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 02:09 AM
I'm trying flow designer right now, you said create wait condition until checkbox is true, actually I'm trying that but it is disabled:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 02:34 AM
before wait for condition. use get catalog variable and then use wait for condition to see if its true...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....