- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 02:45 AM
Hi all,
I am doing a bulk import for the Response templates table.
The template body field on the form is a html field and hence when I transform from the string field it does not work. Nothing is being imported into that field only, rest of the fields are being imported fine.
I tried using below transform map script but does not work:
I am using onBefore transform script, not sure if that is what I should be using.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
mydata= source.u_short_description;
htmlvalue=GlideStringUtil.getHTMLValue(mydata);
gs.info(htmlvalue);
})(source, map, log, target);
please advise
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 08:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 03:43 AM
What is the result if you don't use the transform script, but just do a field-to-field transform?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 08:01 AM
so the fix was to uncheck 'run business rules' on the transform map.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2022 08:23 AM
Just to add. Unchecking 'run business rules' didn't work for me, because after reimport, that option would recheck in the transform map. What worked for me, was to deactivate the exact business rule called 'Validate template variables'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 11:45 PM
So a BR was preventing you to update the HTML field? Well, I'm glad it's resolved!
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark