Add case field to the 'Case Ticket Action' widget

franksilveira
Kilo Expert

Hello Experts,

 

I am currently trying to add the close_notes from the Case form to the 'Case Ticket Action' widget but my HTML understanding is bare minimum and i am not able to do so.

 

The objective here is when the widget appears, the close_notes are to be on top of the buttons so the user can read it before clicking on accept of reject.

 

Can someone please help?

 

Thank you.

1 ACCEPTED SOLUTION

franksilveira
Kilo Expert

Hello All,

 

After a while i was able to come up with a solution.

Here is the solution:

I've added to the following line (in red) to the Server Script:

 

var gr = $sp.getRecord();
if (gr) {

   data.state = gr.getValue('state');
   data.stateLabel = gr.getDisplayValue('state');
   data.sys_updated_on = gr.sys_updated_on.toString();
   data.label = gr.getLabel();
   data.table = gr.getRecordClassName();
   data.sys_id = gr.getUniqueValue();
   data.CloseNotes = gr.getValue('close_notes');

          }

 

And the following lines to the HTML:

 

<label>Solution:</label>
<p>{{data.CloseNotes}}</p>

 

It is not the prettiest solution, but it is working =).

 

Thank you all.

View solution in original post

6 REPLIES 6

Sorry Frank, I misunderstood your original post - glad you've got it sorted already!

franksilveira
Kilo Expert

Hello All,

 

After a while i was able to come up with a solution.

Here is the solution:

I've added to the following line (in red) to the Server Script:

 

var gr = $sp.getRecord();
if (gr) {

   data.state = gr.getValue('state');
   data.stateLabel = gr.getDisplayValue('state');
   data.sys_updated_on = gr.sys_updated_on.toString();
   data.label = gr.getLabel();
   data.table = gr.getRecordClassName();
   data.sys_id = gr.getUniqueValue();
   data.CloseNotes = gr.getValue('close_notes');

          }

 

And the following lines to the HTML:

 

<label>Solution:</label>
<p>{{data.CloseNotes}}</p>

 

It is not the prettiest solution, but it is working =).

 

Thank you all.