Posts Tagged ‘Apex’

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” [...]

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 [...]

Salesforce Interview Question – Part 13

121 : Consider we have overall 90% code coverage however there is one class which have 0% code coverage. Can we still able to deploy that class on production? Ans : Yes. Minimum 1% required for every trigger and there is no such restriction for Apex class. 122 : How to get selected records ID [...]

Salesforce Interview Question – Part 12

111 : How to get the Recordtype Id using Dynamic Apex? Ans: Normally to get the RecordtypeId for any sObject we use SOQL and it will count against your limit. So below method will bypass the need of SOQL Query. 112 : Write Apex code which will take the RecordID as input and on the [...]

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 [...]

Salesforce Interview Questions – Part 10

This Part of Salesforce interview question series depict on browser compatibility issue (Internet Explorer 9) and Visualforce normally for AJAX, Group By and Having Clause. 91. How to add the Document Header in Visualforce page? Ans : Directly there is no way to add the document type in visualforce. However in most of the cases [...]

Apex based record sharing in Salesforce

There are situations where the business requirement is too complex and standard sharing rules provided by the Salesforce will not work. Example: On Opportunity, you want to give access to record to some users which are in related list. One way is to manually share the record which will need the interference of opportunity owner. [...]

APEX based DDP generation using LOOPlus

Example of generating dynamic document packages (DDP) using Apex and LOOPlus in Salesforce

Introduction to View State in Visualforce

Introduction to View State in Visualforce with example and code walk-through