How to update the Retire date of the asset?

Annie Scott
Tera Contributor

I have the below condition, When you click on the button, it must happen the following behavior:

  • A pop-up is displayed with the next fields:
    • Quantity (mandatory field)
    • State = retired ( read only )
    • Substate (not mandatory and editable)
      • These are the values for this substate: None, Disposed, Sold, Donated
    • Retired date (mandatory field)
    • Disposal reason (mandatory field)
      • If substate is Sold, set disposal reason = "Sold"
      • If substate is Donated, set disposal reason = "Donated"
  • Then when you click on submit, 
    • The state change to "retired"

when I update the retired dated on the pop, it does not sync with the asset page.

 

find_real_file.png

find_real_file.png

2 REPLIES 2

Community Alums
Not applicable

Hi @Annie Scott ,

You can run one time fix script to update retired date in bulk for retired CIs.

 

var l = new GlideRecord('alm_asset');
l.addEncodedQuery('install_status=7');
l.query();
while(l.next()){

l.retired = "";
l.update();

}

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Hi Sandeep,

 

Sorry but it did not work for me.