How to Add Line Spacing in description After createCaseFromProducer()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 03:03 AM
Hi All,
I'm using the following script to create an HR case from a catalog item producer:
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, cat_item.sys_id);
The description field in the resulting case is a bit too congested. I want to add one line spacing between each line for better readability.
What I've tried:
1. For plain text (description)
But this doesn’t seem to have any visible effect, possibly because the output is rendered as HTML.
2. For HTML (rich_description)
But this creates a lot of spacing.
My Questions:
What is the correct way to insert spacing (e.g. double line breaks or paragraphs) between lines in rich_description after the case is created?
Should I modify the content before or after calling createCaseFromProducer()?
Is there a reliable way to check or modify how rich_description is being formatted during the case creation?
Any suggestions or examples would be greatly appreciated!Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 03:14 AM
how do you populate the Description field? By mapping or via script field?
It can be done if that script field on that particular record producer and that is HTML.
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 03:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 03:29 AM
@Anusha chandra
Perfect, than it shall be something like this:
current.description = producer.field1 + '\n\n' + producer.field2 + '\n\n' + producer.field3;
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 03:35 AM
@Anusha chandra I just tested in my PDI and works OK:
Let me know if there are any issues or if you need to re-adjust it differently
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */