When you select Planned Start Date on change form, validate if Planned Start Date is after 10 days of current date. If not display an error message below the field and clear the value selected?

Nikita Sangare
Tera Contributor

When you  select  Planned Start Date on  change form, validate if Planned Start Date is after 10 days of current date. If not display an error message below the field and clear the value selected.

1 ACCEPTED SOLUTION

@Nikita Sangare 

Server side aswell you can do that without even script.

Create a Before Insert Business rule on change request table as below

Condition :

find_real_file.png

 

And in Actions Tab, you can set as below

find_real_file.png

 

Mark as correct and helpful if it solved your query.

Regards,
Sumanth

 

View solution in original post

9 REPLIES 9

Valmik Patil1
Kilo Sage

Hi Nikita,

Found one thread which might help you,

https://community.servicenow.com/community?id=community_question&sys_id=868611811b851910cd3b33bc1d4b...

Please let me know if you need any other help

Thanks,

Valmik

SumanthDosapati
Mega Sage
Mega Sage

Hi @Nikita Sangare ,

You can do it easily with an UI policy as below

Condition :

find_real_file.png

 

And in script tab, In execute if true :

function onCondition() {
	g_form.clearValue('planned_start_date');
	g_form.showFieldMsg('planned_start_date',"Cannot be after 10 days",'error');
	
}

 

Mark as correct and helpful if it solved your query.

Regards,
Sumanth

but using sever side scripting how can i do that.

 

but using sever side scripting how can i do that.