- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
“In a problem record, when we click the Accept Risk button, a popup appears. In that popup, there is a Primary Known Error Article field, and we need to make this field mandatory. On the main form, the same field exists, but it should not be mandatory there. It should only become mandatory when the Accept Risk button is clicked and the popup is displayed.”
Thanks in advance for you suggestions
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @Srilatha Vadlam
This can be easily done by placing a Ui Policy check the screenshot which I tried out in PDI. I am not sure how are you trying to make field mandatory earlier best approach will be below one as this modal which opens is in specific view which is stated in Ui Script [ProblemModalUIHelpers] called on line 242.
code:
var ob = new ProblemModalUIHelpers();
ob.openModal("accept_risk_dialog_form_view", getMessage('Accept Risk'), 900, formValues, "accept_risk");
//where accept_risk_dialog_form_view is view in which modal get open.
If my response has helped you, hit the helpful button, and if your concern is solved, do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
HI @Viraj Hudlikar ,
Can you guide me same thing I need show in SOW also
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
the view which is rendered is "accept_risk_dialog_form_view"
so apply your UI policy on those views and make field mandatory
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Ankur Bawiskar ,
I tried it still it is not working but I want problem record in default view only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
so you want that field to be mandatory only when pop-up opens and not in the native backend form view?
Usually that view is used to render fields in the pop-up. Why would your users use that view in back-end?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hello @Srilatha Vadlam ,
You can simply go to views on problem form , select that accept risk dialog form view and then configure that form layout as you want and then you can easily make it mandatory fields as you want .
If this helps you then mark it as helpful and accept the solution.
Regards,
Aditya