move asset from 'in stock' to 'in use' when related request item is closed

raycallan
Giga Guru

When a requested item is closed the asset linked to the item remains 'in stock' with a sub-state of 'reserved'. We then open the asset and manually change the state to 'in use'.

Ideally I would like this to happen automatically when the related request item is closed.

I would have expected this to be a standard process but I haven't been able to find anything on this in any documentation or searching the topic

Am I missing something obvious or do I need to code in this functionality.

We are currently on Fuji and in the process or upgrading to Helsinki

1 ACCEPTED SOLUTION

larstange
Mega Sage

Hi



you are right - this does not happen automatically out of the box.


you need to apply a script activity to the end of your workflow to set the asset "in use"



Here is what i do:



//Sets the Asset for this Order to "In Use"




var ast = new GlideRecord('alm_asset');


ast.get(workflow.scratchpad.asset);




ast.install_status = 1; //In use


ast.substatus = '';


ast.assigned_to = current.request.requested_for;


ast.stockroom = null;


ast.update();


View solution in original post

6 REPLIES 6

To add to what Ben has suggested, it is common to have a workflow process support your Request.  


After the receiving step would come a fulfillment task (Ben touched on this). The task would identify the software to install, OS build, or possibly a standard "image" to apply to a computer.   A following task would be to deliver and setup the laptop to the Users cube.   Upon Delivery the Desktop Support technician assigned to the task would either manually update the asset record, or automation would do so upon closure of the task.


I'm using the procurement process and have all the related tasks.


One of the last tasks for the support technician is to manually update the asset record, I would like to automate this step



  • Request lines for Hardware devices are fulfilled either by transfer orders or purchase orders
  • Request lines for Consumable items are fulfilled by transfer orders


Thanks


Ray