Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

BR not working when script included called in condition section

Shweta Maurya
Tera Contributor

Requirement- Need to update "warranty expiration" feild for below filter condition in alm_hardware table.

Issue- I have written script include and called that script include in BR in condition section. But BR is getting worked for all assets without checking for condition.

Below is the BR & script include. Please suggest if i am missing anything here.

 

filter query-

ShwetaMaurya_1-1730295737474.png

 

ShwetaMaurya_0-1730295653273.png

 

BR-Before-->update  or insert on alm_hardware table

ShwetaMaurya_2-1730295787717.png

 

 

5 REPLIES 5

Danish Bhairag2
Tera Sage

Hi @Shweta Maurya ,

 

Can u try writing the asset filter function code outside the initialization function & then try. I think it will work.

 

Thanks,

Danish

I think it is outside the initialize function only and script include in working fine I checked through logs it is returning correct asset. But BR is not working as per the condition.

i think u should also return false in order to restrict.

 

 

I tried. Still same issue