- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 05:18 AM
Hi Team
I'm working on a requirement where I need to prevent the submission of a CIR if the field it_fun_org is empty. The challenge is that this field is read-only on the form. This field is Currently populated based on Business application
Field Name : it_fun_org ( reference type : Business_app)
I want to restrict form when the it_fun_org field is empty.
Please help me how can i achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 06:09 AM
try this
function onSubmit() {
var itFunOrg = g_form.getValue('it_fun_org');
if (itFunOrg == '' || itFunOrg == undefined) {
g_form.showFieldMsg('it_fun_org', 'IT Functional Org must be populated before submission.', 'error');
return false; // Prevent submission
}
return true;
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 06:38 AM
it's Working ,
Thanks @Ankur Bawiskar for your help.