default value not populating for life cycle stage and life cycle stage status attribute
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hello Team,
I have a requirement to populate the default value of life cycle stage attribute with operational and life cycle stage status with In use. I have updated the values in the dictionary of both the attributes in the parent configuration item table.
But when i opening a new record to check it, it is giving some weird empty record . Kindly help
As both are reference fields, i have provided correct sysid values but still not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Those sys_ids don't exist on your instance. The popup in your first screenshot confirms this — it's resolving to a record with a blank Name, meaning the sys_id points to a non-existent or empty record.
Sys_ids for Life Cycle Stage records vary between instances. You likely copied these from documentation or another instance.
Fix: Look up the correct sys_ids on your instance:
// Run in Scripts - Background
var gr = new GlideRecord('cmdb_life_cycle_stage');
gr.addQuery('name', 'Operational');
gr.query();
if (gr.next()) gs.info('Life Cycle Stage (Operational): ' + gr.getUniqueValue());
var gr2 = new GlideRecord('cmdb_life_cycle_stage_status');
gr2.addQuery('name', 'In use');
gr2.query();
if (gr2.next()) gs.info('Life Cycle Stage Status (In use): ' + gr2.getUniqueValue());
If no results come back, the CMDB Life Cycle Management data hasn't been loaded on your instance. In that case, check if the CMDB CI Lifecycle Management plugin (com.snc.cmdb.lifecycle) is active, and if so, verify that the cmdb_life_cycle_stage and cmdb_life_cycle_stage_status tables actually have records populated.
Once you get the correct sys_ids from your instance, update the dictionary default values with those, and it should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hello @Naveen20 . Thank you for your response. I have given correct sysid's but data is not coming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
49m ago
Few likely causes: for the issue
1. Check for overriding dictionary entries on the child table. Navigate to sys_dictionary.do?sysparm_query=element=life_cycle_stage^name!=cmdb_ci — if there's an entry on cmdb_ci_oracle_instance (or any child class), it overrides the parent's default value. You'd need to set the default there too, or remove the override.
2. Flush the cache. Dictionary default changes sometimes don't take effect until you do sys_cache.do and click "Flush." This is a common gotcha.
3. Dependent field conflict. life_cycle_stage_status is a dependent reference filtered by the selected life_cycle_stage. When both defaults load simultaneously on a new form, the status field may fail to resolve because the stage value hasn't been "committed" to the form yet. This is a known quirk with dependent reference defaults.
Recommended workaround if cache flush + no overrides still doesn't fix it: Use a Business Rule instead of dictionary defaults:
// Before Insert on cmdb_ci
// Condition: current.life_cycle_stage.nil()
(function executeRule(current, previous) {
if (current.life_cycle_stage.nil()) {
current.life_cycle_stage = '53584655b7620010ee0d3177ee11a97f'; // Operational
}
if (current.life_cycle_stage_status.nil()) {
current.life_cycle_stage_status = 'e4990295b7620010ee0d3177ee11a9db'; // In use
}
})(current, previous);
Set this as a before insert rule on cmdb_ci. This approach bypasses any dependent field timing issues and dictionary inheritance problems, and it'll apply across all child CI classes.
