Impact of changing reference in a reference type catalog variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 05:31 AM - edited 07-09-2025 05:34 AM
I recently worked on a requirement to change the reference data point for a reference type variable in catalog item.
Sounds Simple, right?
The requirement was just to change the table from table X to table Y and no changes in variables , UI policies etc.
I made the change and
SURPRISE !!!!
It was perfectly fine with the new form, but on existing open records the variable value was wiped off in Catalog request item also in catalog tasks.
When I thought about it I found it logical because there was some data and we have changed the data point for that field. I know that values on string or select boxes ( even if they were getting auto populating from reference field which was chnaged) dont get changed on old records so I assumed same would work for the reference fields.
SOLUTION
- I created a new field, referenced with new table X as per client requirement
- Autopopulated existing select box and text field based on this new field
- Deactivated the old field which was referencing to the table X. Did not change the reference though
OBSERVATIONS/LEARNINGS
- I tried creating the same field with same name as I deactivated the older one but system did not allow, so I had to change the name of old field and created the new with with old name to avoid any changes in existing scripts. Means you cannot create new fields with same name even if the other field with same name is deactivated
- Even though field was deactivated, the moment I changed the name UI policy action picked up the new name and it was working even though field was deactivated. UI Policies work even for deactivated fields ( Off course in the old records as new records will not show up the deactivated field)
- New field did not appear on the old records. New fields appear only on the new catalog item requests.
ASK FROM THE COMMUNITY
It was a simple requirement yet i learned a few things which are basics but sometimes we move a head with complex things and get stuck eith basics 🙂
Ask from you experts is , please tell me did I do it right way?
Is there any other way I could have done it making sure least changes for myself (dev) and stake holders?
Please comment your suggestions on this scenario.
Hope this article helps new developers and some of experienced dev ( like me :P) as well.
Thank you!
- 307 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 05:39 AM
@umaaggarwal I hope you got this surprise in lower environment not in Prod. I mean you must have tried this Dev and tested.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 08:37 AM
ha ha , yes off course 😄