Posts

Showing posts from August 21, 2019

Visualforce Most Common Interview Questions and Answers for MNCs and Small-Mid Companies

Image
***  Visualforce Most Common Interview Questions and Answers for MNCs and Small-Mid Companies  *** Salesforce Visualforce What is Standard List Controller? Ans:-   Standard List Controllers allows displaying a list of records in visualvalfoce page. We can also create pagination actions  (First, Lat, Next & Previous) using a Standard List Controller. Syntax:  <apex:page standardController = "Account" recordSetVar =  "accounts" > Give some examples of Visualforce Tags? Ans: -  What is a Custom Controller? Ans: -   https://sujay-salesforce.blogspot.com/2019/08/visualforce-controllers.html Can we use standard controller & controller attributes at a time? Ans: -   No. What are the tasks of a standard controller? Ans: -  https://sujay-salesforce.blogspot.com/2019/08/visualforce-controllers.html How can you create visualforce page in Salesforce? Ans: -    From the setup, the menu goes to Setup ⇛ d

Display your account name using a custom controller and input filed at visaulforce page

Display your account name using a custom controller and input filed at visaulforce page Extension Controller:  use to build custom functionalities that are not available at Standard controller. We can create more than one extension controller at a visualforce page. Visualforce Page: <apex:page controller="customAccController">     <apex:form>         <apex:pageBlock title="Hi {!$User.FirstName},">             Your Account Name: <apex:inputField value="{!account.name}"/>             <apex:commandButton action="{!save}" value="save"/>         </apex:pageBlock>     </apex:form> </apex:page> Custom Controller: public class customAccController {     private final Account account;     public CustomController() {         account = [SELECT Id, Name, Site FROM Account                    WHERE Id = :ApexPages.currentPage().getParameters().get('id')];    
Visualforce Tag Tag: <Apex:page> <!-- Use to start the Visualforce page --> </Apex:page> ---------------------------------------------- <Apex:PageBlock> <!-- Use to display a block inside Visualforce page --> </Apex:PageBlock> ---------------------------------------------- <Apex:PageBlockSection> <!-- Use to display a Section inside Visualforce page --> </Apex:PageBlockSection> ---------------------------------------------- <Apex: PageBlockTable> <!-- Use to display a table inside Visualforce page --> </Apex: PageBlockTable> ---------------------------------------------- <Apex: Coloum/> <!-- Use to display a coloums inside table inside Visualforce page --> ---------------------------------------------- <Apex: Form> <!-- Use to display a form inside Visualforce page -->