Consumable - Transfer order issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-09-2018 03:29 PM
Transfer order on Consumables:
Please help me in understanding the operation/architecture on how Transfer order on Consumables is built in ServiceNow cause I think there is an issue with the architecture of TOs on Consumables.
Tested in Developer instance:
Based on the transfer order process provided in Docs, If the consumables are being transferred from one stockroom to another it works as expected but :
Case (1) Consider the Transfer order on a consumable within the same stockroom as shown below:
In this scenario: "Ready for fulfillment" option is available, also the consumable asset is attached to the Transfer order line (marked the areas that are crucial for Transfer order in RED)
Once "Ready for fulfillment" button is clicked... the TO goes directly to received state as shown below, Asset is removed from the Transfer order line and merged with existing "In Stock" and "Available" records as opposed to modifying the state to either "In stock" - "Pending install" or "Reserved"
1) If Asset is removed from TO (as shown in above picture) how would you track which consumable asset related to that TO
2) Consider if "Service Desk" team deploys the consumable to the user or with an asset, how will he/she change the status on the asset that was supposed to be linked to this transfer order
We cannot expect end users to go into the model and then Consume the required consumables.
Case (2) : Our current process for Hardware and Consumables
In our company, currently for all the hardware assets the Transfer order process is as below:
a)As soon as the hardware is ordered it changes state from " In stock"/"Available" to "In stock" / "Pending Transfer"
b) Warehouse team changes the state fro "In stock"/"Pending transfer to" In stock "/"Pending install " once the asset is delivered to Service Desk
c) Service Desk then changes the state to "In use" once deployed.
This completes the transfer order as shown below:
Similarly if same process is leveraged for the consumables, as soon as Transfer Order is created and then changing the states from "In stock" / "Pending transfer " TO "in stock"/"Pending install" please see the issue as shown below:
1) On the Transfer order:
So now as a process:
1) Which state will help me track the consumable asset , so that it is still attached to the Transfer order line
2) Also if the asset is not available on Transfer order line , how will the Service Desk member go into the asset records and update it to either "in Use" or Consume it.
I did check the business rule " Merge Records" and script include " Consumables" where i can modify the script but i am not sure if I should do that or if there is something else that i am not aware of.
Please help me in understanding the system better
Regards,
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-11-2018 09:43 AM
Hi,
Finally I was able to fix this issue:
Please change the code in 1) Merge Records 2) Push Status to Asset/Consumable OOTB business rules respectively, such that the pending install state will work for the consumables too.
On Push Status to Asset/Consumable by default it was set to relieve the consumable form the Transfer order. Comment that line which will keep the asset attached to the transfer order even though the class is consumable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2021 06:13 AM
Hi Manoj,
We are having issues with Consumable Transfer order as well, wonder if you will be able to assis
So for consumables, when we try to transfer it from stock room A to Stock room B using transfer order line. Close all 4 tasks of fulfillment to receive it shows under correct stock room. As soon as we close Delivered task ... info message appear: "Merged updated record with previous record with similar attributes: "Personal stockroom - Anthony Roy"...
Let me know if I should update Merge Business Rule/script include
"mergeConsumable: function(current) {
var doRedirect = false;
if ((!current.nil()) && (!current.doRedirect.nil()))
doRedirect = current.doRedirect;
var gr = new GlideRecord('alm_consumable');
gr.addQuery('model', current.model);
gr.addQuery('location', current.location);
gr.addQuery('model_category', current.model_category);
gr.addQuery('stockroom', current.stockroom);
gr.addQuery('install_status', current.install_status);
gr.addQuery('substatus', current.substatus);
gr.addQuery('parent', current.parent);
gr.addQuery('assigned_to', current.assigned_to);
gr.addQuery('sys_domain', current.sys_domain);
if (SNC.AssetMgmtUtil.isPluginRegistered('com.snc.procurement')) {
if (current.install_status == 2)
gr.addQuery('purchase_line', current.purchase_line);
}
if (current.active_to == true)
gr.addQuery('active_to', true);
else
gr.addQuery('active_to', false).addOrCondition('active_to', null);
gr.addNullQuery('planned_for_disposal').addOrCondition('planned_for_disposal', false);
gr.query();
while (gr.next()) {
if (gr.sys_id != current.sys_id) {
var parms = [];
parms.push(gr.getDisplayValue('stockroom'));
parms.push(gr.getDisplayValue('install_status'));
parms.push(gr.getDisplayValue('substatus'));
// eslint-disable-next-line max-len
gs.addInfoMessage(gs.getMessage('Merged updated record with previous record with similar attributes: Stockroom - {0}, State - {1}, Substate - {2}', parms));
gr.quantity = parseInt(gr.quantity, 10) + parseInt(current.quantity, 10);
gr.cost = parseFloat(gr.cost) + parseFloat(current.cost);
gr.update();
if (new TableUtils("sm_asset_usage").tableExists()) {
var assetUsageRecords = new GlideRecord('sm_asset_usage');
assetUsageRecords.addQuery('asset', current.sys_id);
assetUsageRecords.setValue('asset', gr.getUniqueValue());
assetUsageRecords.updateMultiple();
}
current.deleteRecord();
current = gr;
if (doRedirect == true)
action.setRedirectURL(gr);
break;
}
}
}, "