How to Dynamically Display Record Producer Variables and Apply Catalog UI Policies and Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
27m ago
Hi Community,
I am working on a requirement to create a custom leave request submission UI in the ServiceNow Employee Center portal.
I have created a custom page and widget to implement a four-step leave request wizard.
Current Implementation:
Step 1 – Select Leave Type: The user selects the type of leave they want to request.
Step 2 – Enter Leave Details: The form fields are displayed based on the selected leave type. Currently, these fields are manually defined in the widget script.
Step 3 – Review Details: Display all applicable field values entered or selected by the user in Step 2 so they can review the information before submission.
Step 4 – Confirmation: Display a confirmation message after the request has been successfully submitted.
Requirements:
Dynamically display the variables configured in the corresponding Record Producer based on the leave type selected in Step 1, instead of hardcoding the fields in the widget.
Ensure that all applicable Catalog UI Policies and Catalog Client Scripts associated with the selected Record Producer work as expected, including field visibility, mandatory conditions, and other client-side behaviors.
In Step 3, display the applicable fields and their values entered by the user in Step 2.
On final submission, create an HR Case record in the "sn_hr_core_case" table using the selected Record Producer and the submitted variable values.
In Step 4, display a confirmation message after successful submission, preferably including the created HR Case number.
Retain the custom UI design and four-step navigation.
Questions:
Is there an out-of-the-box or supported approach to dynamically render Record Producer variables within a custom Employee Center widget?
Can the associated Catalog UI Policies and Catalog Client Scripts execute correctly when the variables are rendered dynamically in a custom widget?
Is there a recommended ServiceNow API or component for reusing the existing Record Producer configuration and client-side logic?
How can I implement the review and confirmation steps while ensuring that the submitted values are processed through the selected Record Producer and the HR Case is created correctly?
I would appreciate any recommendations, documentation, or examples of similar implementations.
Thank you!
