Need to know How the Text from Service portal gets transferred to the field in the Instance

spimple
Tera Contributor

I have a requirement in which when a CUSTOMER closes a incident pop up comes up and asks for some resolution notes and after filling those the Resolution note field in the Instance filled up with the text the Customer entered while closing the case.

There is another field which is rquired to move incident to C7 - Closed (In instance). But when the customer in the portal directly closes the Incident in the portal . All I want is the field in the instance should directly get filled by the text "Closed By the customer"

How to achieve this ?

2 REPLIES 2

Manoj89
Giga Sage

Hi,

 

I don't know how your script is set, but add the below

 

//server script
var gr = $sp.getRecord();
gr.close_notes = "Closed by caller";
gr.update(); //don't add this if your script is already updating the record

 

add the above where the record is updated after the user clicks update

spimple
Tera Contributor

Can you please tell me how to populate the field present in the instance when a customer closes the case from the portal.
Requirement is 

1) If engineer has filled in the field prior to the case closing (no matter how it is closed out) then leave the field as is.

2) If the customer closes the case through the portal and the field is empty, add "Case closed by Customer".

3) If the case closes due to customer inaction after 14 days, and the field is empty, add "Case closed due to customer inaction".


How to populate the field present in the Instabnce if Customer close the case on portal and if the field on case form is empty (In instance)