The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Reference field need to populate based on Subject person and HR service in HR case creation page.

shivadayal4
Tera Contributor

On HR case creation page, there is custom reference field - 'Request subcategory' which refer to custom tables 'Global Request subcategories' table, which stores subcategory mapped based on Subject person's country and the associated HR service's Record producer. 

 

In case creation form on selection of subject person and Hr service, this subcategory field should dynamically populate only those filtered record that matched the selected country and record producer.

 

I have written client script to get the value of subject person and HR service from case creation form and script include to get the multiple sys id of subcategories from global request subcategories table. but unable to set those sysid in request subcategory reference field.

And when i am trying to take input in reference qualifier instead of client script, then it's not getting the current selected Hr service and subject person.

Please support here.

 

@Ankur Bawiskar - Can you support in this.

 

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@shivadayal4 

please share screenshots.

if you are talking about HR Case Creation page then from native or workspace you are checking?

Also that's OOTB UI page for native. why to change that?

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

shivadayal4
Tera Contributor

Hello @Ankur Bawiskar 

Hello Ankur 

 

Yes I am updating in agent workspace. 

Not changing in oob case creation ui page script.

 

We have dependency on request subcategory on assignment rules. Although end user will raise case through frontend portal. But through virtual agent, hr agent may raise case through agent workspace. In this scenario this will be challenged.

 

I have tried both with on change client script and reference qualifier on this field. But it seems something is missing.

If from client script, we cannot set multiple sysid, then can you suggest how to take input from case creation page in reference qualifier advance script. I am using below script and passing this tow parameter in script include, but it’s not getting any value.

 

javascript: new GetRequestSubcategoryFilter().getSubcategoryIds(current.hr_service, current.subject_person);

 

Can you please check and update here

shivadayal4
Tera Contributor

Hello @Ankur Bawiskar 

 

Yes I am updating in agent workspace. 

Not changing in oob case creation ui page script.

 

We have dependency on request subcategory on assignment rules. Although end user will raise case through frontend portal. But through virtual agent, hr agent may raise case through agent workspace. In this scenario this will be challenged.

 

I have tried both with on change client script and reference qualifier on this field. But it seems something is missing.

If from client script, we cannot set multiple sysid, then can you suggest how to take input from case creation page in reference qualifier advance script. I am using below script and passing this two parameter in script include, but it’s not taking the user selected value from form.

 

javascript: new GetRequestSubcategoryFilter().getSubcategoryIds(current.hr_service, current.subject_person);

 

Can you please check and update here.

shivadayal4
Tera Contributor

Hello @Ankur Bawiskar 

 

Yes I am updating in agent workspace. 

Not changing in oob case creation ui page script.

 

We have dependency on request subcategory on assignment rules. Although end user will raise case through frontend portal. But through virtual agent, hr agent may raise case through agent workspace. In this scenario this will be challenged.

 

I have tried both with on change client script and reference qualifier on this field. But it seems something is missing.

If from client script, we cannot set multiple sysid, then can you suggest how to take input from case creation page in reference qualifier advance script. I am using below script and passing this two parameter in script include, but it’s not taking the user selected value from form.

 

javascript: new GetRequestSubcategoryFilter().getSubcategoryIds(current.hr_service, current.subject_person);

 

Can you please check and update here.