Category: Apex
-
Lightning Data Service – Standard Controller for Lightning Components
Best Practices for Salesforce Lightning Component. How Lightning Data Service can improve Lightning Component performance and solve inconsistent data problem without writing single line of Apex code. Demo source code, image and slides included.
-
System mode or God mode in Apex – Gotchas
Gotchas of System mode or God mode in Apex and its impact by using “With sharing” keyword in Salesforce
-
All about Upsert and External ID in Dataloader and Apex – Videos
You may be wondering that there are tons of articles available for upsert operation and what is need of one more blog post. I wanted to note everything important about upsert operations using datalaoder and Apex with identified gotchas at single place, and that’s why its here 🙂 . External ID is field in Salesforce…
-
Salesforce interview questions – Part 19
Salesforce interview questions for developers and admins around Apex, Visualforce, getting Salesforce object name on basis of Id, Apex API limits
-
Send Email with Generated PDF as attachment from Trigger – before Winter 16
There may be scenario in Salesforce that you need to send a Visualforce page rendered as PDF as a part of Email Attachment. This will be very easy if you want to perform this using Controller or Extension class, we just have to call getContentAsPDF() method of PageReference class and use returned blob data as…
-
FAQ and Best Practices of Test Classes in Apex
Here I am going to share few answers related to Test Classes, which is being asked many times to me by novice Programmers. Please feel free to post Comments if your question is not answered here. I will try my best to add those Questions in this article. If you want to learn Test Class…
-
Consuming External Web Service in Apex – Salesforce
One of the feature we have in Salesforce is that we can easily consume External Web Services. In this article, we will learn step by step demo of consuming Web Service in Apex. There are many public websites available to consume Web Service and one of them, I am using in this article is http://www.webservicex.net…
-
Apex, Visualforce, Data Loader and SOQL Interview Question – Part 17
161 : Sometimes while deleting record it gives error “Object cannot be Deleted”. What is the reason for this kind of error ? Ans : This is generic error message prompted by Salesforce many times, which is not well informative. To get informative message, we can try to delete same record in “Developer Console”. In…
-
Apex Interview Question – Salesforce – Part 16
151. Give Sample Code Snippet of Apex that that will show that how Parent and Child record can be inserted in Single Statement ? Ans : It can be done with help of External Id. 152 . Which SOQL statement can be used to get all records even from recycle bin or Achieved Activities? Ans…