Wednesday, September 10, 2014

39)How can we generate a pdf in visualforce page

<apex:page standardController="Account" extensions="AccountPdf"  showHeader="false"  sidebar="false" renderAs="PDF"  title="AccountReport.pdf"
         contentType="application/pdf#AccountReport.pdf" >
       
         <head>
             <title>AccountReport.pdf</title>
         </head>
         <apex:outputText value="Hello World"/>
 </apex:page>

38)How can you refresh a particular block in visualforce page ?

Using reRender attribute.

37)How much code coverage is needed for deployment?

Each trigger should have minimum of 1%. Class can have 0%. But, the total code covergae of 75%.

36)How can you call a controller method from javascript

Use action function component to call controller method from java script.

35)How can we implement pagination in Visualforce page ?

Use Standard sets controller for implementing pagination.

34)What is whoid and whatid in Salesforce ?

Whoid is the id of either contact or Lead. Whatid is the id of the related to record in activity record(standard or custom object)

33)What happens upon lead conversion ?

When lead is converted contact, account and optional opportunity is created.