Category: salesforce

Salesforce, Apex, Visualforce, SOQL related posts

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/

Transient Keyword – View State – Visualforce – Salesforce

Transient Keyword – View State – Visualforce – Salesforce Transient Keyword – View State – Visualforce – Salesforce: We can use transient keyword with apex class’s instance variables when we want that values of those variables should not be transferred as part of the view state of visualforce page. This helps us reducing the view …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/transient-keyword-view-state-visualforce/

Test class in salesforce with example

Test class in Salesforce with example Test class in salesforce Testing is an important part of SDLC. So, before deploying our code to production environment, Salesforce requires at least 75% of your code to be covered by our test classes whic. Salesforce has done that to make sure that our code doesn’t break in any situation …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/test-class-with-example-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/

Pagination using standard set controller salesforce

Pagination using standard set controller salesforce

Pagination using standard set controller salesforce We can use Standard set controllers provided by salesforce to implement pagination in visualforce. It is very easy to implement pagination using standard set controller. We can easily navigate through pages, move directly to first, last page or to next or previous pages using standard set controller. We can …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/pagination-using-standard-set-controller-salesforce/

Avoid recursive trigger in salesforce

Avoid recursive trigger in salesforce using static variable Avoid recursive trigger in salesforce using static variable Recursion occurs when same code is executed again and again. It can lead to infinite loop and which can result to governor limit sometime. Sometime it can also result in unexpected output. It is very common to have recursion …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/avoid-recursive-trigger-salesforce/

get current record id salesforce

get current record id salesforce

get current record id salesforce apexpages.currentpage().getparameters().get(‘id’) can be used to get current record id or other url parameters in apex code. Many times we have requirement to get current record id or url parameters of visualforce page in apex code. Many times we require the current record id in controller. For example we are redirecting from one visualforce …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/get-current-record-id-salesforce/

Permanent link to this article: http://www.sfdcpoint.com/salesforce/migration-using-ant-in-salesforce/

actionstatus visualforce disable screen

actionstatus visualforce disable screen

actionstatus visualforce disable screen actionStatus visualforce component displays the status of an AJAX update request. An AJAX request can either be in progress or complete. Depending upon the AJAX request status (whether AJAX request is in progress or complete), this component will display different message to user. In many scenarios AJAX request takes some time. …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/actionstatus-visualforce-disable-screen/

custom label in apex code salesforce

custom label in apex code salesforce example We can use System.Label.labelName to access custom label in apex code. Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values can be translated into any language Salesforce supports. Custom labels enable developers to create multilingual applications by automatically presenting …

Continue reading

Permanent link to this article: http://www.sfdcpoint.com/salesforce/custom-label-in-apex-code-salesforce/