Add items from MRVS to catalog task Description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2022 12:53 PM
Hi, we have a list of 26 items the customer can select to order from the hardware catalog. Upon submitting the order the fulfiller adds items to backfill into a MRVS. I want all Items added to the MRVS to be added to a single backfill catalog task in the description. Could anyone show me how this could be done?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2022 01:12 PM - edited ‎11-28-2022 01:13 PM
There's a backordered button on the requested item form.
Maybe create a flow or business rule that whenever this is checked, automatically create the catalog task. And in that task you can just display the mrvs. Otherwise, if you need to print the mrvs to the description, see this post
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2022 01:14 PM
If the Catalog Task doesn't yet exist, add something like this example to the script in that activity, setting the value of task.description. Otherwise your Run Script in the workflow, or Business rule would have to do a GlideRecord on sc_task to return the correct record, then set the description field and update that record. The logic is the same either way. The MRVS is stored as JSON, so you just have to loop through it and grab the variable values that you want.
var desc = '';
var mrvs = current.variables.network_gear_model_mrvs; //internal name of MRVS
var rowCount = mrvs.getRowCount();
for(var i = 0; i < rowCount; i++){
var row = mrvs.getRow(i);
desc += 'Model to order: ' + row.v_mrvs_model_name + '\nQuantity to order: ' + row.v_mrvs_quantity + '\n';
}
task.description = desc;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2022 05:18 PM - edited ‎11-28-2022 05:18 PM
Thanks for the replies! @Brad Bowman Sorry, I forgot to mention this client is currently using flow designer rather than workflow. Would the favorable action than be to use a business rule? Currently, I set a for each loop to loop through the mrvs but it creates a separate catalog task for each item added to the mrvs, and they prefer to have a single task with all items in the description...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2022 05:31 PM
@Mike_R the fulfiller needs to choose multiple items from the list on the order evaluation task that needs to be backfilled and have those items appear on a single backfill task for completion.