Default Source and Destination Stockroom on the Source Request UI Page SOLVED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â03-20-2024 10:26 AM
I have found a solution for setting the default source stockroom and default destination stockroom on the Source Request ($source_request) UI page. The solution is adding functionality to the ProcSourceRequestManager script include, and the key was discovering the name of a property that is not disclosed to us, item.sourceDefault.transfer, which I inferred from the name of the local order property, item.sourceDefault.local.
That's all there is to it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â01-15-2025 10:16 PM - edited â01-15-2025 10:19 PM
Hi @community Alums
I'm trying to set the Destination stockroom based item category with the below code
_populateTransferOrderInfo: function(item) {
//Set the destination stockroom based on the item category
var ritmGR = new GlideRecord('sc_req_item');
ritmGR.get(item.sys_id);
var deliverToSite = ritmGR.cat_item.category.toString();
var stockGR = new GlideRecord('alm_stockroom');
if (deliverToSite == '1ed803df332d9210ce6f72d24d5c7be6') {
stockGR.get('c5d0f922978fd6d03408f017f053afbd');
var destStockroom = {};
destStockroom['value'] = stockGR.getValue('sys_id');
destStockroom['displayValue'] = stockGR.getValue('name');
//item.destDefault.transfer = JSON.stringify(destStockroom);
item.destDefault.purchase = JSON.stringify(destStockroom);
gs.info('#dest stockroom is ' + item.destDefault.purchase + ' ' + JSON.stringify(destStockroom));
return item;
}
},
log is getting printing in log table but its not setting destination stockroom on purchase order.
what could be the issue