Tag: SOQL

Relationship Query in Apex – Salesforce

How to create relationship name

Relationship Query in Apex – Salesforce Relationship Query in Apex – Salesforce Most of the times, we have relationships between the objects(master-detail OR lookup) and often we need to fetch the list of all child records related to parent record in SOQL. This can be achieved using relationship query in Salesforce. We can also say …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/relationship-query-apex-salesforce/

SObject row was retrieved via SOQL without querying the requested field

SObject row was retrieved via SOQL without querying the requested field SObject row was retrieved via SOQL without querying the requested field is very common error in apex. As name of error suggest, this error occurs when we try to use some field of an object instance which is not queried. There can be two …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/sobject-row-was-retrieved-via-soql-without-querying-the-requested-field/

SOSL Example in Salesforce

SOSL-Example-in-Salesforce

SOSL Example in Salesforce SOSL – Salesforce Object Search Language SOSL is a search language in salesforce and the important feature is that Unlike SOQL, we can search in multiple objects at same time using SOSL. In SOQL, we can query only one object at a time but in SOSL, We can search for some …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/sosl-example-in-salesforce/

Dynamic SOQL query to fetch all fields in Salesforce

Dynamic SOQL query Salesforce SOQL is Salesforce Object Query Language for querying data in the Force.com platform. It is very much similar to SQL. But in SOQL, we can not query all fields from object. This statement is not allowed in SOQL: select * from Account; But there is one trick to query all fields …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/dynamic-soql-query-fetch-fields-object-salesforce/