Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
error

We made a wrong turn. Try again.

I have a C⌗ program what was working great until i modified this query.  The query currently reads...

qr1 = binding.queryAll("select id, external_id__c from contact where external_id__C in '" + naidno2 + "'");

This line of code produces this error message... "Binding variable only allowed in Apex code"

naidno2 is a string which contains unique IDs separated by commas, i.e. "A4568,R4568,D6548,A4568"

 
2 answers
  1. Feb 13, 2015, 5:16 AM
    Hi Klein,

    Please try to send the data in following format;

    string s1='Test';

    string s2='Test 1';

    string Querystring = 'select Id, Name from Account where name in (\''+s1+'\''+','+'\''+s2+'\')';

    Input query string should be like this ==>select Id, Name from Account where name in ('Test','Test 1')

    Thanks

    Shaijan
0/9000