+ Start a Discussion
Adam StaronAdam Staron 

passing variable to SOSL find query

Hi guys I want to use the SOSL to pass a variable inside the FIND query but I have no idea how to do that and if its even possible doing it that way. Here for example -
conn.query("Select {user variable here} IN ALL FIELDS RETURNING Account(Name), Lead(Id, Name)",
        function (err, res) {
            if (err) { return console.error(err); }
Any tips on how I can get around that?

Thank you very much for your time :) 
PriyaPriya (Salesforce Developers) 

Hey Adam,

Kindly refer this example :- 

If this helps kindly mark it as the best answer.

Thank you,

Priya Ranjan