Hot answers tagged

5 votes
Accepted

SOQL query in .js file in LWC

No, you can't write a SOQL in the js file, but if the SOQL would have been something like "SELECT fields FROM object WHERE Id = 'xxx'" or "SELECT fields FROM object WHERE Id IN ...
user avatar
  • 3,738
4 votes
Accepted

how to select all AccountId of the table X that is not in the table Y?

It might not work with CampaignMember, but the mechanisms you need for this are called table joins and anti-joins. It would look something like: SELECT Id FROM Account WHERE Id IN (SELECT AccountId ...
user avatar
  • 144k

Only top scored, non community-wiki answers of a minimum length are eligible