- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2019 11:35 AM
HI SN Team,
Requirement is to Populate Opened For and Subject Person in Case Creation UI page only with HR Profiles and Not User Profiles.
Approach being followed :
i would like to know the line of code similar to code present in below link in setting Opened for (small f and refers to users table) with value selected in Opened For (capital F refers to HR Profile) on click of "create Case" button.
https://community.servicenow.com/community?id=community_question&sys_id=eafb3aa5db0a53044837f3231f96199d&view_source=searchResult
Thanks
Manasa
Solved! Go to Solution.
- Labels:
-
HR Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2019 07:19 PM
This is one possible way to do it. You can specify the reference qualifier for the two fields. Here is a link to an article explaining how to set the reference qualifier in jelly: https://community.servicenow.com/community?id=community_question&sys_id=4c1117e9dbdcdbc01dcaf3231f96...
To make the qualifier perform better, we created a reference field on sys_user to sn_hr_core_profile and a new after insert/update/delete business rule on sn_hr_core_profile where user changes and user is not empty to set the hr profile reference field with the sys_id of the hr profile. Adding this reference qualifier on the hr case table will improve performance as well.
The reference qualifier in our case is: active=true^u_hr_profileISNOTEMPTY
Important note: by adding this qualifier, you will be skipping the default behavior of creating an HR Profile where one doesn't exist. You just want to make sure you have a method, such as an integration with an HR system or a scheduled job, for generating the HR profiles you need.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2019 07:19 PM
This is one possible way to do it. You can specify the reference qualifier for the two fields. Here is a link to an article explaining how to set the reference qualifier in jelly: https://community.servicenow.com/community?id=community_question&sys_id=4c1117e9dbdcdbc01dcaf3231f96...
To make the qualifier perform better, we created a reference field on sys_user to sn_hr_core_profile and a new after insert/update/delete business rule on sn_hr_core_profile where user changes and user is not empty to set the hr profile reference field with the sys_id of the hr profile. Adding this reference qualifier on the hr case table will improve performance as well.
The reference qualifier in our case is: active=true^u_hr_profileISNOTEMPTY
Important note: by adding this qualifier, you will be skipping the default behavior of creating an HR Profile where one doesn't exist. You just want to make sure you have a method, such as an integration with an HR system or a scheduled job, for generating the HR profiles you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2019 01:53 AM
Hi Jeremy,
Thank you Jeremy for the assistance.
I had earlier implemented the solution you mentioned above but then we were not able to search in opened for and subject person with first name or (*)last name or Employee number .
Hence Discarded the solution.
Hi Ticket solution states that remove opened for and subject person for the first form.
But then another issue arouse that opened for and subject person were empty fields after case got created .
On top of this another fix applied was to let opened for and subject person be displayed on Form but Hide it via code
$j(#ev_field_opened_for_label).hide().Similarly other fields .
Now the form is working fine .
Thanks
Manasa