Time worked field in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 01:06 AM
Hi,
I have added the Time Worked field in incident form. This field is OOTB field.
This field is mandatory for incident form I have done this but It wont work in portal end but it is working for portal end also How can I restrict from portal end. Please could help me anyone.
Thanks,
Manju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 02:48 AM
Hi ,
i have tried in my pdi with above script ui type as desktop i am able to submit incident from portal without error message it will only restrict incidents submitted in native ui.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 03:13 AM
Hi,
Yes, but one BR I have attached above right that BR is working from Portal end, Now how can we block that BR for portal?
I have screen screenshot below, Please check that client script and BR codes.
Client script:
BR:
Thanks,
Manju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 03:15 AM
See the Portal end error screenshot below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 03:30 AM
Try below script
function onSubmit() {
//Type appropriate comment here, and begin script below
var channel1=g_form.getValue('contact_type');
var time=g_form.getValue('time_worked');
if(time=='00:00:00' && channel1!='self-service'){
g_form.addErrorMessage('please imput time worked');
g_form.setMandatory('time_worked',true);
return false;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 03:47 AM
It's not working