Date of Decommission - When CI status in "Decommissioned" then Date of Decommission should be populated and if status moved back to "Deployed" for any reason then date of decommission should become blank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2022 04:13 AM
Date of Decommission - When CI status in "Decommissioned" then Date of Decommission should be populated and if status moved back to "Deployed" for any reason then date of decommission should become blank.
when ci status changes to decommissioned data of decommission populated in List view but not populated in from view please see attached screen short and below client script existing script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
var substatus = g_form.getValue('u_sub_status');
if(substatus =='Decommissioned'){
g_form.setDisplay('u_date_of_decommission',true);
var ajax = new GlideAjax('MyDateTimeAjax');
ajax.addParam('sysparm_name', 'nowDateTime');
ajax.getXML(function () {
g_form.setValue('u_date_of_decommission', ajax.getAnswer());
});
}
else {
g_form.setDisplay('u_date_of_decommission',false);
}
- Labels:
-
Agent Workspace