how can i put in a check what it will check on the stock room for availability at reassigning sctask
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 05:02 AM - edited 02-01-2024 05:48 AM
i have a catalog form created.
1. how can i make it automatic populating the stock room field based on the configuration of the stock room ?
2. how can i put in a check for stock availability in that particular stock room of the item in the variable field before re-assigning the ticket ?
i tried to use this but stockroom field of the form is still blank
(function executeRule(current, previous /*null when async*/) {
// Check if Assignment Group is set
if (current.assignment_group.getDisplayValue() != '') {
// Query the Stockroom based on Assignment Group
var stockroomGR = new GlideRecord('alm_stockroom');
stockroomGR.addQuery('assignment_group', current.assignment_group);
stockroomGR.query();
// If a stockroom is found, set the Stockroom field on the catalog form
if (stockroomGR.next()) {
current.stockroom = stockroomGR.getValue('name');
}
}
})(current, previous);
0 REPLIES 0