1

I get this error in output:

Bind variables only allowed in Apex code'

The query is:

   "SELECT O.Id, O.Name, O.OwnerId, U.Name FROM Opportunity as O,User as U WHERE  O.OwnerId = U.Id  "

What's wrong with this query?

  • what would you like to do? Would you like to test if the logged user is the same of the Opportunity? – m Peixoto Jan 26 '18 at 12:08
  • @mPeixoto Yes, and return the owner who creates the opportunity – OiRc Jan 26 '18 at 12:09
4

you could write the same SOQL in this way:

SELECT ID, Name, OwnerId, Owner.Name
From  Opportunity

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.