Create change request on service operation workspace should populate the incident record as parent

Debasis Pati
Tera Guru

When clicked on the Create change request ui button on service operation workspace it takes the short description and description to the change request i want the parent field also to be mapped with the incident r record.create change request ui action.png

How this will be done?
@Ankur Bawiskar  any clues?

2 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Debasis Pati 

 

"Out of the box (OOTB), it gets added to the 'Incident Fixed by Change' field, not under the 'Parent' field.

DrAtulGLNG_0-1754401895093.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@Debasis Pati 

CHG and INC are not having parent <-> child relationship between them.

when you create CHG from INC you don't populate the parent field on CHG.

the Change Request field on INC is updated with the CHG you created when you click that UI action in SOW

See below

AnkurBawiskar_0-1754402158745.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

@Debasis Pati 

I will suggest to push back on this requirement.

If customer is not willing to listen, I shared the approach with script below to populate the parent field.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Debasis Pati 

"Yes, in that case, there will be only one parent, which again becomes an issue — you can’t have more than one. It’s better to push back on this request and advise the customer to stick with the out-of-the-box (OOTB) behavior.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@Debasis Pati 

As per my below comment the Change Request field (rfc) gets populated on INC form with the newly created CHG.

If you want to populate the parent field then you can use this logic

After update business rule on INC table

Condition: current.rfc.changes() && current.rfc != ''

Script:

(function executeRule(current, previous /*null when async*/ ) {

    // Add your code here
    var chg = current.rfc.getRefRecord();
    chg.parent = current.sys_id;
    chg.update();

})(current, previous);

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Debasis Pati 

CHG and INC are not having parent <-> child relationship between them.

when you create CHG from INC you don't populate the parent field on CHG.

the Change Request field on INC is updated with the CHG you created when you click that UI action in SOW

See below

AnkurBawiskar_0-1754402158745.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader