How to use window.location.href.contains() in script include?

Thousif S N2
Tera Contributor

I need to push field as mandatory based on the ui view . So i want to make the validation based on URL using  window.location.href.contains(). So if the url belongs to second UI page then make field as mandatory? But i am trying its not working ! so can any expert help

Thanks in advance

1 ACCEPTED SOLUTION

@Thousif S N 

Would you mind marking my response as correct & helpful if I am able to resolve your query?

Regards
Ankur

 

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

View solution in original post

26 REPLIES 26

@Thousif S N 

Hope you are doing good.

Would you mind marking my response as helpful/correct if I am able to resolve your query so that this question moves to answered list and helps future readers.

Regards
Ankur

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

@Thousif S N 

Would you mind marking my response as correct & helpful if I am able to resolve your query?

Regards
Ankur

 

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