- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 08:59 AM
In a business rule how can I test for the presence of a mrvs in a record created from a record producer. I can check if there are variables using if (current.u_variables_present == true) but it's not including the mrvs. Is there an equivalent statement for mrvs?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 09:37 AM
Is there any field which you are populating in the target table to identify record created from which record producer?
If yes then you can get that record producer sysId and query "io_set_item" with that record producer with type as this
var recordProducerSysId = current.u_record_producer;
var query = 'variable_set.type=one_to_many^sc_cat_item=' + recordProducerSysId;
var gr = new GlideRecord("io_set_item");
gr.addEncodedQuery(query);
gr.query();
if (gr.next()) {
// this record producer has MRVS in it
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2022 08:58 AM
Thanks, Ankur.
This is what I was looking for.
Deb