Category: salesforce

Use static resource in Visualforce

Static resource archive structure

Use static resource in Visualforce – Salesforce Force.com platform provides us a facility to upload, manage and use the content that is static (not changing) for your organization, and it can be stored under “Static Resources“. It can be a Javascript file, CSS file, an image or even a zip file containing all the files …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/use-static-resource-in-visualforce/

apex:pageMessage and apex:pageMessages – Salesforce

pageMessages

apex:pageMessage and apex:pageMessages – Salesforce Most of the times we are confused between these two visualforce components i.e. apex:pageMessage and apex:pageMessages. A small different of ‘s’. Let’s see the difference between apex:pageMessage and apex:pageMessages – Salesforce. We are confused that which one should we use, and in which case. There is a small difference between these two. …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/apexpagemessage-and-apexpagemessages-salesforce/

Relationship Query in Apex – Salesforce

How to create relationship name

Relationship Query in Apex – Salesforce Relationship Query in Apex – Salesforce soql relationship query 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 …

Continue reading

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

Transient Keyword – View State – Visualforce – Salesforce

View State In Salesforce

Transient Keyword – View State – Visualforce – Salesforce View State in salesforce What is view state in salesforce? ViewState holds state of the visualforce page that holds state that includes the fields, components and controller state. Viewstate data in encrypted and cannot be viewed tools like firebug. There is a limit of 135KB of …

Continue reading

Permanent link to this article: https://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: https://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: https://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: https://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: https://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: https://www.sfdcpoint.com/salesforce/get-current-record-id-salesforce/

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