Need to make mandatory impacted services/CIs mandatory if there is no imapcted service has added

Mansi roy
Tera Contributor

Hello,

 

Can anyone please help on the below requirement.

 

In change request in the related list there is impacted services/CIs present.

 

Mansiroy_1-1743065456479.png

 

I need to make mandatory it if impacted services/CIs  has not been added in the change request.

 

Could anyone please help me on this.

 

Regards,

Mansi.

 

1 ACCEPTED SOLUTION

Shivalika
Mega Sage

Hello @Mansi roy 

 

I am not sure how your impacted services are calculated. But if it just relies on the services field - you can make it mandatory using client script, BR or anything. 

 

Else, you can use below 👇 BR 

 

if (!new GlideRecord('task_ci').addQuery('task', current.sys_id).hasNext()) {
gs.addErrorMessage('At least one Impacted Service must be added before proceeding.');
current.setAbortAction(true);
}

 

In the condition field add suitable conditions like state changes to implement it asses or review whatever you prefer, on update business rule. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

View solution in original post

5 REPLIES 5

Shivalika
Mega Sage

Hello @Mansi roy 

 

Please confirm if you checked my answer. Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for my efforts and also it can move from unsolved bucket to solved bucket. 

 

Regards, 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeE