Skip to main content

Posts

Salesforce Visual Force Interview Questions - 2

12. What are the Best Practices to Improve Visualforce Performance? 1) By using the with sharing keyword when creating your Apex controllers, you have the possibility of improving your SOQL queries by only viewing a data set for a single user. 2) The view state size of your Visualforce pages must be under 135 KB. By reducing your view state size, your pages can load quicker and stall less often. 3) Reduce Multiple Concurrent Requests: use <apex:actionpoller> 4) Preventing Field Values from Dropping Off the Page. 5) Large page sizes directly affect load times. To improve Visualforce page load times:       Cache any data that is frequently accessed, such as icon graphics.       Avoid SOQL queries in your Apex controller getter methods.       Reduce the number of records displayed on a page by adding filter condition in SOQL 13.  What is the maximum size of the PDF generated on visualforce attribute renderAs? 1 . Before being

Salesforce Summer 2019 Certification Maintenence Questions & Answers

What allows Flows to manipulate complex data types that are often returned from calls to web services? Screen components Primitive Apex objects Apex-defined data types External service registrations What is the benefit of using the Continuation class in Apex to make a long-running request to an external web service? Multiple Continuation action calls can be made in parallel. A single Continuation object can contain up to 10 callouts. DML operations can be performed within the Continuation. More long-running callouts can be made using Continuations. Which Lightning web component configuration file tag set specifies the form factors that the component supports? <targets> <isExposed> <supportedFormFactors> <design:supportedFormFactors> Which tag adds the Lightning Web Components for Visualforce JavaScript library to a Visualforce page? <apex:include/> <apex:lightning/> <apex:includeLightning/&

Date Validation in Lightning Compononents

In this post we are going to see how we can validate the date for any form which takes some input along with the date. For Example you are enrolling yourself of the some concert on certain date in the events portal and you are submitting your attendance confirmation for this event. So in this case you cannot select the past dates for the events which you will be attending. Lets see how we can validate this in Lightning component. Step 1: Create a lightning component . Launch the Developer Console, Goto  File > New > Lightning Component _________________________________________________________________________ <aura:component>     <!--create myDate aura attribute for store date field value-->       <aura:attribute name="myDate" type="date" />     <!--create dateValidationError boolean attribute for show error msg on invalid selection       and disable submit button -->         <aura:attribute name="dat

Salesforce Visual Force Interview Questions-1

1. What is visualforce controller in salesforce? What are they? Visualforce controller is a set of instructions that specify what happens, when user interacts with components on visualforce pages, such buttons & links. Here are the 3 types of controller   1.  Standard Controller,  2. Custom controller &  3. Controller extensions. 2. What is Standard Controller?  Standard controller provides the salesforce in built functionality to interact with visualforce pages. You can use the standard actions like Save, Edit, Cancel & delete by using standard controllers. Syntax : <apex:page standardController=”Account”> 3. What is Custom Controller? Custom controller is an apex class that implements customized logic to visualfore pages. We can override or create new functionality by using custom controllers. Syntax: <apex:page controller=”Account” > 4. What is Standard List Controller? Standard List Controller allows to display list of rec

How to prevent the changes to the field in Salesforce after it has been saved?

If the requirement is to prevent the changes to a field after it has been saved initially, there can many ways to do it but the best approach would be from the Validation rules. Its quite simple in Validation rule than doing the same in triggers with apex code. Lets take an example, In the Orders Object you have custom field 'Initial_Payment_Made__c" and once this field has been saved, we should not be able to edit or prevent any changes to this field. We can create a validation rule for this as below. AND(    ISCHANGED( Initial_Payment_Made__c ),    NOT( ISNEW() ) )

Salesforce Dashboards : Points to Remember

A dashboard is a visual display of key metrics and trends for records in your org. The relationship between a dashboard component and report is 1:1; for each dashboard component, there is a single underlying report. However, you can use the same report in multiple dashboard components on a single dashboard (e.g., use the same report in both a bar chart and pie chart). Multiple dashboard components can be shown together on a single dashboard page layout, creating a powerful visual display and a way to consume multiple reports that often have a common theme, like sales performance, customer support, etc. Points to Remember: Each dashboard component has Data sources with source report and components which are visual format like graph, chart or gauge To create a dashboard component, drag the report from Data sources into Dashboards area and Drag the visual component to the same area.  Visualforce pages can also be added to the Dashboards to show custom interfaces Dashboard ca

Deploying Metadata Migration Failed

While Deploying Metadata in your Org thru ANT tool fails with below error, even though you have enter the right username and password with security token and URL.  BUILD FAILED D:\Salesforce Migration Tool\salesforce_ant_38.0\sample\build.xml:60: Invalid username, password, security token; or user locked out. In this case, its quite possible that, you are deploying Apex classes to production environment, and total test coverage is not greater than 75% or all the Classes or not covered with test classes.  In case you are deploying to another sandbox or dev environment then you don't need to test your classes.