Data from field as work notes in ticket form

Anna
Tera Contributor

Hello, 

is it possible to have the data from the field to be added into the work notes as a separate note? I would like to create additional field, where user would state important information, and I would like this information to be added as work notes. 

 

find_real_file.png

1 ACCEPTED SOLUTION

Michael Jones -
Giga Sage

If I understand correctly, when the record is saved with a value in your custom field (or some set of values) you want to create a work_note entry on the record, I assume so that a notification is triggered?

You could do this with a Business Rule on Incident, advanced, run before insert.

For the condition you would want to select your custom field and then "changes" and if you only want certain options to add a note, select those options - in my example I have a field "test choice" and I only want to add a note if I have selected Option 1 or Option 3. 

find_real_file.png

 

Then add one line of code in the script - update the field name "u_test_choice" to be the name of your custom field. 

(function executeRule(current, previous /*null when async*/) {

	current.work_notes = current.u_test_choice.getDisplayValue();  //update u_test_choice to your field name

})(current, previous);

I hope this helps!

If this was helpful, or correct, please be kind and mark the answer appropriately.

Michael Jones - Proud member of the GlideFast Consulting Team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

View solution in original post

2 REPLIES 2

Michael Jones -
Giga Sage

If I understand correctly, when the record is saved with a value in your custom field (or some set of values) you want to create a work_note entry on the record, I assume so that a notification is triggered?

You could do this with a Business Rule on Incident, advanced, run before insert.

For the condition you would want to select your custom field and then "changes" and if you only want certain options to add a note, select those options - in my example I have a field "test choice" and I only want to add a note if I have selected Option 1 or Option 3. 

find_real_file.png

 

Then add one line of code in the script - update the field name "u_test_choice" to be the name of your custom field. 

(function executeRule(current, previous /*null when async*/) {

	current.work_notes = current.u_test_choice.getDisplayValue();  //update u_test_choice to your field name

})(current, previous);

I hope this helps!

If this was helpful, or correct, please be kind and mark the answer appropriately.

Michael Jones - Proud member of the GlideFast Consulting Team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Michael, thank you very much for help.