How to add and show few more fields into modal pop up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 08:03 AM
In the problem task form, when the state is "work in progress" and I am about to click on the "complete" UI action, a modal pops up with some mandatory fields. I have attached a snapshot of it for reference. My requirement is to add a few more fields and display them in the modal box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 08:23 AM
Hey @kiran115 ,
Click into the UI action configuration and look at what UI page it is calling.
You can then modify that UI page and add the fields you want.
Make sure to edit the processing script and/or client script to add the values to the record after the submit button is clicked.
Thanks
Jake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 08:27 AM
This Ui Action is calling below script loader.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 08:41 AM
Hi @kiran115 ,
I assume this is an out of the box script. I would not recommend editing this.
ProblemModalUIHelpers is a ui script. You can find it in the ui scripts table.
This is also out of the box and I do not recommend editing it.
You will need to review the UI script ProblemModalUIHelpers and determine how it is gathering the fields to display.
If you need to modify the ui script and ui action then I would recommend deactivating the out of the box ui action and creating your own UI action and cloning the UI script ProblemModalUIHelpers and modifying it so that it displays the fields you want it to.
Your organisation may have different best practices in its approach to editing or cloning out of the box scripts so consult your team for the best solution on this.
Thanks
Jake
Thanks
Jake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 08:42 AM - edited 08-02-2024 08:45 AM
Hi @kiran115
It is being controlled through the 2 different Form Views, 1 form View is for RCA Type Problem Tasks and the other is for General Problem Task. You can check the script here at,
https://<instance_name>.service-now.com/sys_ui_script.do?sys_id=592479f30b4123005775aabcb4673a32&sysparm_record_target=sys_ui_script&sysparm_record_row=1&sysparm_record_rows=1&sysparm_record_list=nameSTARTSWITHProblemModalUIHelpers%5EORDERBYname
To add more fields to it, Open any problem_task record and then in the header Right click then select Configure -> Form Design
In the form designer opened, Select PTASK Complete Dialog View 1 for RCA type task and add the fields you needed and click Save.
Repeat the same for PTASK Complete Dialog View 2 view for non RCA type tasks.
Please mark my answer hepful 👍 and accept as a solution ✔️ if it helped.
Anvesh