Outage End date Validation in Change Request

JaganN971616731
Tera Contributor

Hi Community,

 

I have a requirement that a validation needs to be added to Outage end date field. The condition is outage end date should be on or before the planned end date of the Change request. If the condition doesn't satisfy an alert message will pop up and make the field blank. Can you help me with the code? 

 

JaganN971616731_0-1718779267466.png

Your response would be appreciated.

 

Regards,

Jagan

5 REPLIES 5

Voona Rohila
Kilo Patron
Kilo Patron

Hi @JaganN971616731 

You Can write a before insert/Update BR on Outage Table.

Modify the conditions accordingly

Example : 

VoonaRohila_0-1718780818479.png

VoonaRohila_1-1718780831177.png

 

There are few OOTB BR's with similar logic, please check: 

https://dev12345.service-now.com/nav_to.do?uri=sys_script.do?sys_id=d002d015c7121300628953c6f0976301

 

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Hi Rohila,

 

Unable to open the link. Could you please provide kind of screenshots?

 

Regards,

Jagan

It is a dummy Link with the path, replace dev12345 with your instance details.

You can also refer the screenshots I attached.

Here is the example:

VoonaRohila_0-1718803338347.png

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

G Sai Vamshi
Mega Guru

Hi @JaganN971616731 

 

You can write the ui policy to do this comparision. Please check the link below

 

https://www.servicenow.com/community/developer-articles/no-code-date-validations-through-catalog-ui-...

 

Please mark it as helpful or solution accepted