18.9Scenario 8 — SOQL by External ID
Prompt:
“Query the Salesforce Account for customer C001.”
Write:
SELECT
Id,
Name,
Phone,
BillingCity,
BillingState
FROM Account
WHERE External_Customer_ID__c = :customerId
Then explain:
“I'd parameterize the value rather than concatenating it into the SOQL string.”