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

Rohit  Singh
Mega Sage

Hi @Mansi roy ,

 

You can make the field "Services" mandatory by doing configuration dictionary for that field and make Mandatory (Make sure you do Dictionary override so that it is mandatory in the Change Request only). Once it is mandatory at the field level and once the record is saved then that CI of type services will be available in the related list "Impacted Services/CI".

 

You can't make related list as mandatory.

 

 

If my response helped, please hit the Thumb Icon and accept the solution so that it benefits future readers.

 

Regards,
Rohit

Hi @Mansi roy ,

 

Please refer my response. If it helps you then please accept the solution and hit thumbs up. Since as per new community feature you can mark more than response as correct.

 

Regards,

Rohit

Najmuddin Mohd
Mega Sage

Hello @Mansi roy ,

On the Assess UI Action, you can call a script include which returns True or False, by checking if any Impacted Services/ CIs are added or not.

If there is No Impacted Services/ CIs associated, user will not able to Click Assess.

If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

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