Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to write OR condition in query for addEncodedQuery using script

String
Kilo Sage

Hi Team,

Am using below OR condition in the below query, but it shows syntax error 

 

Please guide me 

 

var fieldMappingRef = new GlideRecord('customer');
fieldMappingRef.addEncodedQuery('email=test.test@xyz.com'+OR+'^u_siebel_contactid=11');

fieldMappingRef.query();

if (fieldMappingRef.next()) {
gs.info("enter");
}else

{gs.info("last");

}

1 ACCEPTED SOLUTION

Sonu Parab
Mega Sage

Hi @String Try below Encoded Query.

 

fieldMappingRef.addEncodedQuery("email=test.test@xyz.com^ORu_siebel_contactid=11");

To get exact encoded query add filter condition on table and copy from there.

Sonu_Parab_0-1674805249082.png

 

 


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

 

View solution in original post

1 REPLY 1

Sonu Parab
Mega Sage

Hi @String Try below Encoded Query.

 

fieldMappingRef.addEncodedQuery("email=test.test@xyz.com^ORu_siebel_contactid=11");

To get exact encoded query add filter condition on table and copy from there.

Sonu_Parab_0-1674805249082.png

 

 


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