please answer below the queation

Asahi Haritha
Kilo Contributor

when change record state get changes to schedule then planned start date and planned end should be mandatory and display warning message under planned end date fields(message :please select start and end date

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Asahi Haritha 

 

Practically when change moved to assess state before that user neec to fill the plan dates,  I am not sure what is your use case to make these mandatory at schedule state, if you make it mandatory schedule state you will miss the change conflict.

 

To make it mandatory 

 

Write a ui policy 

State = schedule 

Ui policy action

Plan start and end date mandatory.

 

Please try this and share feedback.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sumanth16
Kilo Patron

Hi @Asahi Haritha ,

 

Create onload client script:

 

 

 

function onLoad() {
	if (g_form.getValue('state') == -1 ) { //change value to scheduled
		g_form.setMandatory('planned start date', true);
                 g_form.setMandatory('planned end date', true);
	}
}

 

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

Harish KM
Kilo Patron
Kilo Patron

Hi @Asahi Haritha You can have a before update BR like below

HarishKM_0-1709265036332.pngHarishKM_1-1709265052905.png

 

Regards
Harish