Modify Comments via Business Rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 11:42 AM
Greetings!
We have a field, Comments", which is a journal field type. I would like to be able to modify the comment before it gets submitted.
The goal is to make an entry in the first line that says: "From: username";
function onBefore(current, previous) {
tag_comments();
function tag_comments() {
current.comments = "From: " + current.sys_updated_by;
}
}
However, my business rule is "appending" this line. How can I pre-pend this line into the comments?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 11:47 AM
It looks like "Notes entered in from the GUI" might be custom. I don't think that's standard. I'd check for a higher order Business Rule and either change the order to something greater than your "From:" Business Rule (something like 200 vs 100 which is probably is currently) or add your "From:" in that Business Rule.
Alternatively, you could just add "Updated By" to the Activity feed and that would accomplish the same thing.
-Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 11:56 AM
"notes entered in from GUI" is not triggered by a business rule.
It's input into "External Notes" text box which is right above it. It's basically our "comments" field. I will check on order to see if that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2015 02:01 PM
hmmm - maybe it's an order issue - i'll look into that.