Due date field is giving an error

tushar_ghadage
Tera Contributor

I want to restrict the selection of past date on the "due date " field on the p_task

for that i have create ui policy for the same..

 

but whenever i try to complete or cancle the p_task it shows the error mentioned in the ui policy ( even when due date field is emtpy)

how and why can anyone please suggest ..? 

below is the SS for the error -

Screenshot (524).png

 

10 REPLIES 10

Sure thanks for pointing out almost missed out..😊

 

Its the OOTB ui action 'complete'.. 

 

@tushar_ghadage 

@Kieran Anson has pointed out the issue.

Your UI policy is running on all views due to Global checkbox. Do what Kieran has mentioned.

Explanation

-> The UI policy is running when this form view either "ptask_complete_dialog_view_1" or "ptask_complete_dialog_view_2" is opened via that Complete UI action modal

-> The Complete UI action calls UI script function and that function opens the modal with either of those 2 views based on problem task type

AnkurBawiskar_1-1763036581812.png

 

AnkurBawiskar_0-1763036514902.png

-> the form view in native

AnkurBawiskar_2-1763036651131.png

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks for the detailed explanation ... 

 

Screenshot (528).png

 

As mentioned above Here I am trying to select but unable to get the default view for that ...

Tried with display name as well ...in the UI policy .. 

 

@tushar_ghadage 

yes default view won't be shown there.

you need to select either of these ones

AnkurBawiskar_0-1763099097159.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I tried with above views in the Ui policy but It's not reflecting back as the problem task form, I am testing on is a default view. 

In the case of default view ... how to apply .. because that's where the req is for ..?