- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2014 04:54 PM
Hi all, several of my technicians have requested a feature that would allow them to set a signature that would appear automatically when they update Incidents. We had this functionality in our old ticketing system and our people like to have a friendly and human touch when talking with our customers.
Anyway, to set this up, I just created two new fields on the user table, one to hold a signature and one to toggle it on or off. I am now trying to use a Business Rule to insert the signature after comments. Sounds easy enough, right?
Anyway, for some reason the comment itself is repeating after the signature is inserted. For example, say my signature is '- Ben, Field Tech' and I make a comment on an Incident that says "All done - I fixed the computer. Have a great day!". What shows up in the activity feed is:
All done - I fixed the computer. Have a great day!
- Ben, Field Tech
All done - I fixed the computer. Have a great day!
The code the business rule runs is just:
current.comments += "\n\n" + userSignature
Any ideas why it's doing this or how I can fix?
Thanks!
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2015 10:39 AM
I ended up solving this by creating a Business Rule to run on Display and pass the UserSignature values to the session in the g_scratchpad object.
I could then use a client script (instead of a Business Rule) to insert the Signature on Insert of the Incident.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2014 05:58 PM
Is the business rule running before the insert/update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2014 06:16 PM
Mark, yes. The Business Rule is set to run before on update.
If I set after, display, or async nothing happens (no signature is appended to the comment).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2014 09:00 PM
Hi Ben,
It seems the problem occurring with concatenation.
Can you try this below code
Usersignature = 'Ben, field tech';
Urcomments = 'All done - I fixed the computer. Have a great day!';
Current.comments = usersignature+'\n'+Urcomments;
Regards,
Harish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2014 02:18 AM
Hi Ben,
"current.comments += "\n\n" + userSignature" --> this is where i suspect the issue is. I think you are assuming that current.comment will have the value "ben, field tech" and you just concatenating the signature to it.
what you need to do is get the comment in some variable or something and then add it to comments in 1 go.
current.comment = "ben, field tech" +"\n"+ userSignature ;