I want to amend the copy change process so that it excludes cancelled change tasks. OOTB, it exclud

ManishPatel1
Tera Contributor

 I want to amend the copy change process so that it excludes cancelled change tasks. OOTB, it excludes changes..can anyone tell how to fix it?

1 REPLY 1

Voona Rohila
Kilo Patron
Kilo Patron

Hi @ManishPatel1 

The whole logic is handled in ChangeUtilsSNC which is a readOnly Script Include but this was extended by ChangeUtils script Include, You can override the logic for method 'makeRelatedTableCopy' and add additional encoded query if related list table is Change Task table.

 

Something like this:

if (table === this.CHANGE_TASK)
{
srcGr.addEncodedQuery('state!=4');
}

 

 

 

 


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