- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2021 04:00 AM
Hey, I auto-populate values of a contract with the details of a related task record by using a business rule and a client script. Most of the populated fields work but some populated display not the Value of the related field but the Sys ID. How can I convert this to a normal value using my BR and CS?
Some information about the needed code and where to insert would be very helpful.
Thank you for your efforts.
Solved! Go to Solution.
- Labels:
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2021 04:26 AM
Reference fields store sys_ids and display whatever the Display column of the reference table is. If you're not populating this into a field referencing the same table, where you would want to use the sys_id, you can get the display value instead of the sys_id using something like
user = field_name.getDisplayValue();
instead of just
user = field_name.
If it's still not working for you posting your scripts would be very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2021 04:26 AM
Reference fields store sys_ids and display whatever the Display column of the reference table is. If you're not populating this into a field referencing the same table, where you would want to use the sys_id, you can get the display value instead of the sys_id using something like
user = field_name.getDisplayValue();
instead of just
user = field_name.
If it's still not working for you posting your scripts would be very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2021 05:18 AM
It works, thank you very much!
Do you have an Idea how I can add line-breaks to a text field by using javascript code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2021 05:42 AM
I have added \n to the contents of a text field, and it translates that when displaying the value into a new line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2021 05:45 AM
Awesome, thank you!
Last Question for today 😉
Is it possible to make text bold or underline the text in a such a text field?