- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2017 06:55 AM
Hi all,
I am trying to create a script on a record producer for incident to map answers from variables to set values in reference fields on the back end incident form. I have the following in the script:
if (producer.inc_rel_to != ('test')){
current.u_product.setDisplayValue(gs.getProperty('sn_customerservice.insurance_product_schemes'));
}
The system property is:
The u_product field is a reference to the Application Model (cmdb_application_product_model) table.
This is the product I am trying to set:
I know if I set the value of the system property to the sys_id of Insurance Product Schemes then it works if I remove the setDisplayValue from the script. However I am going to have to do something similar a few more times in my script and do not want a load of system properties with just sys_ids in them as it is not user friendly.
Any help as to where I am going wrong will be greatly appreciated
Thanks
Sam
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2017 07:03 AM
Hi Sam,
You're going about this in the right way - congratulations.
Have you tried changing the property to "CDL Insurance Product Schemes"? It looks like the value is missing "CDL".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2017 07:03 AM
Hi Sam,
You're going about this in the right way - congratulations.
Have you tried changing the property to "CDL Insurance Product Schemes"? It looks like the value is missing "CDL".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2017 07:55 AM
Hi Chuck,
All thanks to your TechNow episode 14 TechNow Episode 14 | Avoid Hard-coding - YouTube
I thought it was going to be something simple. I had been using the name field rather than display name field.
All working now
Thanks once again
Sam