Category: Apex
-
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…
-
Using FieldSet with Visualforce and Apex
One of the disadvantages comes up with Custom Page or Overriding New or Edit button with Visualforce page is its “Maintenance”, if New Filed is Added or needed to remove field we have to modify our code every time. However, Thanks to Salesforce that we have “Field Set“. With the Help of “Dynamic Visualforce Binding”…
-
Salesforce Interview Question – Part 14
131. What will happen if you try to update record in After Trigger Context? Ans : You will get an error saying “record is Read only”. 132. Let’s say we have to update the same record in After Trigger context. Is there any way or workaround? Ans : If we create a new instance of…
-
How to Debug Manage Package in Salesforce
Many times as a developer we need to debug the manage package for possible run time error. For example , while uploading contacts using Import wizard we get “Internal Server Error” and when we try to look into debug log there is no clear indications. However in my experience i have seen this kind of…
-
Merge PDF in Salesforce Using Java, ITextPDF and OAuth 2
Its long time, since i wrote any article because of my busy schedule However this time i came with advance one. In this article we are going to use the J2EE (Servlet) to Merge PDF attachment inside salesforce with the help of OAuth and ITextPDF jar file. The reason of writing this article is that…
-
How to Sort Wrapper class Collection in Apex
There is inbuilt functionality in Apex to sort the primitive datatypes supported by force.com. I am sure maximum of developers must have come across the situations where they need to sort custom datatype built by them i.e. custom class or I would say wrapper class in terms of force.com. But think, How force.com will come…
-
Apex based record sharing in Salesforce
Working with Apex based sharing in Salesforce
-
APEX based DDP generation using LOOPlus
Example of generating dynamic document packages (DDP) using Apex and LOOPlus in Salesforce