Archives

SOQL self-join semi-join anti-join examples

Query Account from Contact using child-to-parent relationships: Select id, Name, Account.Name, Account.Owner.Name, Account.Owner.Profile.Name, RecordType.Name from Contact Sub Querying from Contact using parent-to-child relationships: Select id, Name, Account.Name, Account.Owner.Name, Account.Owner.Profile.Name, RecordType.Name, (Select Opportunity.Name, Opportunity.StageName from Contact.OpportunityContactRoles), (Select id from Contact.Tasks), (Select Id from Contact.Cases), (Select Id from Contact.OpenActivities) from Contact Outer Joins from Contact: Select id, […]

Rate this:

Read More