Using a variable in business rule add message field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 11:31 AM
Hello all, I have a requirement for a business rule to prevent closure of an Incident under certain conditions. I did this using filter conditions (when to run). It works as expected. I have an additional requirement to display a message. The message is a string that contains a value of one of the fields on the form (the related change request). Is there a way to insert the value of the field into the message? For example, now I get "Incident has an open Change request and cannot be closed" , but what I would like is "Incident has an open Change request (CHG0160031) and cannot be closed"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 11:38 AM
Hi Richard,
Incident has an open Change request (${current.rfc}) and cannot be closed
rfc is the field name for the Change Request related record if thats the field you are talking about
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 11:46 AM
Hi Sean, that is exactly what I was looking for and it works perfectly. Did you find this in the documentation somewhere? Thank you very much for your help!
Regards,
Ric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 12:08 PM
Hi Richard,
Glad it was what you were looking for.
Heres a bit of info on what we just did
Template literals - JavaScript | MDN
Another SN example - What does ${} do in Client Script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 11:42 AM
In your business rule, you can use current object to add reference number
like below
Incident has an open + current.u_change_request + and cannot be closed
Regards,
Sachin