Record Producer - How do we update the same case, after adding additional items from the form?

Shubha2
Mega Guru

Hi All,

I need your help with the scenario below:

  1. User fills the form - Record producer does this - This is Working
  2. A case is created - Fields are filled - Working perfect
  3. New requirement - Notification should be sent with an link to the user asking for more information. Something like this: If you have any updates or additional details about your case to share with us, please use this link ____    - I will create a notification with this link
  4. New Requirement  - User should be able to fill some more Information like adding Items on the form and after submitting the Same Case  gets updated with the Information.

 

Questions:

  1. Can the link lead to the same Record producer form? - Need help how to programmatically achieve this, if possible.
  2.  Or should I create another record producer? How does the new record producer update  Same case?
  3. Or any other suggestion? Basically user has to enter some more Items and information  to the same case

 

Your help would be really appreciated.

Thank you

Shubha

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Shubha2 No need to create a new record producer for this. This requirement can be implemented using the following ways.

1. In your notification, you need to provide the URL of your record producer e,g, https://devxxx.service-now.com/esc?id=sc_cat_item&sys_id=3f1dd0320a0a0b99000a53f7604a2ef9 

2. In the above URL you need to add one more parameter which will represent the sys_id of your case e.g.

https://devxxx.service-now.com/esc?id=sc_cat_item&sys_id=3f1dd0320a0a0b99000a53f7604a2ef9&sysparm_ca...

3. Create an onLoad Client script on your record producer and parse the URL parameters with the help of following references.

https://servicenowguru.com/scripting/client-scripts-scripting/parse-url-parameters-client-script/

https://www.servicenowelite.com/blog/2019/7/31/parameters-with-catalog-items

4. Once you extract the value of case sys_id, you just need to Make a GlideAjax call to your script include method to fetch all the values related to that case. 

https://www.servicenow.com/community/developer-articles/client-side-scripting-go-for-glideajax-with-...

5. Populate the values fetched from Script include using g_form.SetValue('field_name', answer.field_value) within the onLoad client script;

 

Hope this helps.

 

 

View solution in original post

5 REPLIES 5

HI Amit,

Thank you so much for your solution, I tried with Sandeep's and I didnot get a chance to try this. I will try with this solution and update you as well. Really appreciated you taking time to reply to my question

Thanks again

Shubha