How to auto-populate a related request field in case form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 04:22 AM - edited 10-12-2022 06:19 AM
Hi all
I want to populate the request field as shown below, similar to inc, chg and prb. However, this seems to be a little difficult as I have tried numerous ways to achieve this without success.
I thought it would only require requestGr = caseGr.u_request; somewhere like this inside the ootb extension point:
updateCaseWithRequestAssociation: function(requestGr, caseGr) {
var request = "[code]<a href='/"+requestGr.sys_class_name+".do?sys_id="+requestGr.sys_id+"'>"+requestGr.number+"</a>[/code]";
caseGr.work_notes = gs.getMessage("Request {0} has been associated with the Case", request);
},
Any idea?
Update: I can manually populate the field and it will complete my case list as seen under (incomplete):
My related lists looks like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 05:57 AM
The relationship between the 2 tables must be the same as other 2. The Business Rule that populates the other 2 can be reconfigured/duplicated for the automation of field population.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 01:01 AM - edited 10-20-2022 01:02 AM
But the 2 others (chg and prb) does not run on business rules, they are scripted actions in ootb csm integration scripts. However, when I try to modify the script for request, it results in several unwanted outcomes; 1.it does not populate the field, and 2. routing in service portal becomes ineffective.