Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Prepopulate the fields while creating child case

Manisha30
Tera Guru

Hi All,

 

We have a requirement to prepopulate the opened for with parent Assigned to field while trying to create a child HR case from HR Agent Workspace.

Tried creating a Business rule before insert, but it is happening after creating the case not while creating or while loading. 

 

Can someone provide your expertise over here?

 

Thanks in Advance!!!

Manisha

1 ACCEPTED SOLUTION

@Manisha30 

so on case creation page you want that to be auto-populated?

I doubt this is feasible as onLoad won't work on case creation

You might have to play with that case creation page by making a duplicate variant of it and then handle the auto population

Lot of customization, I will recommend to avoid and reduce the technical debt

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

View solution in original post

18 REPLIES 18

@Ankur Bawiskar It is working but after submitting the child case and not before submitting(that is on load while creating, when hr service is selecetd) , the assigned to of parent is reflecting on both  opened for and subject person(which should not be) 

@Manisha30 

Sorry your requirement is not clear

As per your original question

-> when you create child HR case you want Parent Assigned to as Opened For in Child case

-> this should work fine based on the onLoad client script

Why HR Service is coming in picture?

when child hr case form loads HR service will be empty unless you are auto-populating it then this line will give empty and it won't go inside your IF

var currentHrService = g_form.getValue('hr_service');

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Ankur Bawiskar When creating child HR Case we have case creation page in workspace, By default the opened for and subject person are being copied from parent OOB, and in our instance we are trying to differentiate the population of opened for based on HR Service selection on case creation page. That's where we are using HR Service here

@Manisha30 

share screenshot how child HR case is created from Parent

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Ankur Bawiskar please find the child case creation screenshot

 
 
 

image (11).png