Adjust Consumable Quantity

Jon Collins2
Kilo Sage

Hi Folks, 

One of our asset users accidently input the quantity on a consumable record incorrectly and now our quantity is off. Is there a straight forward way to adjust the quantity on consumables?

Thanks in advance.

1 ACCEPTED SOLUTION

Scott Halverso1
Mega Guru
Mega Guru

I'm not aware of a non-platform adminstrator solution.  My hope is that when ServiceNow invests in Enterprise Asset Management, they add the ability to do quantity adjustments OOTB.

 

A script like this by a platform admin can correct it quickly.

var gr = new GlideRecord('alm_consumable');
if(gr.get('19d5c21f1be3a0505a448775cc4bcb37')){

    gr.quantity = '10'; //update quantity
    gr.update();
}

 

Alternatively the ACL from 2012 can be adjusted to restrict updating quantity to specific role to be able to adjust inventory counts.  The ACL is alm_asset.quantity, for writes.  Noone, not even admins can edit quantity.

View solution in original post

5 REPLIES 5

Thanks Paul! This problem was largely related to our asset users having the ability to "insert" on a consumable asset record. As you probably know, this creates the asset record again, and then, since it's a consumable, merges the asset records together, essentially doubling the consumable asset quantity for that record. We've now blocked the "insert" button on consumable records for asset users, to prevent this.