Additional Asset Hardware Substate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2019 05:11 AM
I'm having difficulties adding a Substate to an asset with State of "In use" which is OOTB. My Substate record is in place on sys_choice with the relevant dependency value set correctly. However, when selecting "In use" I cannot get Substate out of read-only.
I thought there was some UIP or CS at play, but couldn't find anything. Then thought it was related to Asset CI Install Status Mappings. I tried to create an entry for my new Substate but didn't make any difference.
I think I'm missing something simple; can someone help me understand what is making Substate read-only for some values but editable for others?
- Labels:
-
Enterprise Asset Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2022 12:33 AM
You're right - it was obvious, especially after your article came up at the top of my Google search 😄
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2021 01:45 PM
There is also an on change client script written over the state field on alm_asset Named Correct substatus which clears the substatus field and makes it read only based upon the state
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (newValue == '') {
return;
}
var setSubstatusReadOnly = false;
if (newValue == '1' || newValue == '2' || newValue == '3' || newValue == '10') {
if (!isLoading) {
g_form.setValue('substatus', '');
}
setSubstatusReadOnly = true;
} else if (newValue == '6' && !isLoading) {
g_form.setValue('substatus', 'available');
}
g_form.setReadOnly('substatus', setSubstatusReadOnly);
if (g_form.getTableName() === 'alm_license' && !isLoading && !g_form.isNewRecord() && parseInt(oldValue, 10) === 1 && parseInt(newValue, 10) !== 1) {
g_form.addWarningMessage(getMessage('You have changed the state of this entitlement. This entitlement will no longer be available for reconciliation.'));
}else if(g_form.getTableName() === 'alm_license' && !isLoading && !g_form.isNewRecord() && parseInt(newValue, 10) === 1 && parseInt(oldValue, 10) === parseInt(newValue, 10)){
g_form.clearMessages();
}
return;
}