- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 12:42 PM
So, I created a field called "Associated Incident" which is a plain-text field on a Case table, and I also have a field called "Incident Short Description" which is of type Reference and refers to the Incident table.
What I want to happen is, an Agent enters an Incident number in the "Associated Incident" field, a script auto-populates the "Incident Short Description" reference field with the Short Description of the Incident the agent entered; and I have validation already checking if the Incident exists.
I was able to do this successfully with a plain-text field and simply using a GlideRecord if(gr.next()) statement
current.field_name = grIncident.field_nameBut the problem is, say the Incident record is updated, using this method, the custom fields on my Case table won't reflect the updates from that Incident record because it was a one-time copy.
Now, I've made the "Incident Short Description" field of Reference type so the data is always up to date, but I can't seem to pull in the data into the field. What's a way this can be achieved?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 06:54 AM - edited 06-16-2023 06:56 AM
I would suggest to make "associated incident" field as reference and make changes to script or business rule populate the "incident Short Description" field with short description from incident table. this field should be string.
Once Done, You can create a business rule on incident table which will rule when short description gets updated. This business rule will glide record your custom case table against associated incident field and then update the short description.
This approach is as per best practice and better architecture.
Please Mark helpful or correct Answer , If it solves your query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 06:54 AM - edited 06-16-2023 06:56 AM
I would suggest to make "associated incident" field as reference and make changes to script or business rule populate the "incident Short Description" field with short description from incident table. this field should be string.
Once Done, You can create a business rule on incident table which will rule when short description gets updated. This business rule will glide record your custom case table against associated incident field and then update the short description.
This approach is as per best practice and better architecture.
Please Mark helpful or correct Answer , If it solves your query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 11:05 AM
Thanks, Mehta!
This solution worked beautifully🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 11:34 AM
Make an Incident reference field, the display value will be the INC number. Add a dotwalked field to the form showing u_inc_ref.short_description....no coding needed and will always match if the short description is updated....using a business rule to populate the short description would not happen until AFTER the record is saved.
