How to auto-populate a related request field in case form

Alex D Great
Tera Contributor

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?

AHN_0-1665572897323.png
Update: I can manually populate the field and it will complete my case list as seen under (incomplete):

AHN_0-1665580221258.png
My related lists looks like this:

AHN_0-1665580776395.png

 

 

 

2 REPLIES 2

GodOfWar
Mega Guru

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.

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.