Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
I want to delete an account,i know only the contact name.I need to find in which account the contact is present, and need to delete the account. what is the Soql query for this?
Account acc = [SELECT Id FROM Account WHERE Id IN (SELECT AccountId FROM Contact where Name='Contact Name')]; delete acc;
All Answers
Query for the account id and delete it.
Not sure got your question wrong.