PD1 Cert Prep: User Interface

Study Up on Visualforce

Display content or modify Salesforce data using a Visualforce page and the appropriate controllers or extensions as needed. Incorporate Visualforce pages into Lightning Platform applications.
  • The Review__c object has a lookup relationship to the Job_Application__c object. The Job_Application__c object has a master-detail relationship to the Position__c object. The relationship field names are based on the auto-populated defaults. What is the recommended way to display field data from the related Review__c records on a Visualforce page for a single Position__c record? Utilize the standard controller for Position__c and a controller extension to query for Review__c data.
    Note that cross-object formula fields cannot access child records, only the parent records, and would not work for this use case. You also cannot access child record information using only a standard controller, you would need to use a controller extension.
  • Two capabilities of StandardSetController? Allows pages to perform mass updates of records. Allows pages to perform pagination with large record sets
  • A Visualforce page has a standard controller for an object that has a lookup relationship to a parent object. How can a developer display data from the parent record on the page? User merge field syntax to retrieve data from the parent record. The relative fields are prepended to __r.
  • What are two reasons that a developer should use a custom Visualforce page in a Lightning Platform application? To generate a PDF document with application data. To create components for dashboards and layouts - you can embed a Visualforce page anywhere in your Salesforce dashboard as a standard component.
  • A hierarchy custom setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve the correct URL for the custom user’s profile and display this on a Visualforce page? {!Setup.Url_Settings__c.URL__c}. This is because s specific profile should get a specific record type. So, simply getting a record type Id will not work. We need to know what each profile should get. Hierarchy custom settings support unique values per profile.
  • A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. What two actions should the developer perform to get the record types and picklist values in the controller? Use Schema.RecordTypeInfo returned by Case.SObjectType.getDescribe().getRecordTypeInfos(). Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues().
  • A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account’s address using a SOQL query. The page will also allow the user to make edits to the address. Where should the developer write the account address verification logic? In a controller extension. By creating a controller extension, the developer can extend the standard controller functionality.

  • What is the preferred way to reference web content such as images, stylesheets, JavaScript, and other libraries that are used in Visualforce pages? Upload the content as a static resource
  • What is the name of the controller for a Visualforce page that is used to override the Standard Opportunity view button? The Opportunity StandardController for prebuilt functionality
  • What two tags do you use to load external JavaScript files into a Visualforce page? apex:includeScript> and <script>

Review the Lightning Component Framework

Describe the benefits of the Lightning Component framework. Describe the types of content that can be contained in a Lightning component.
  • Which two resources can you include in a Lightning component bundle? Helper, Documentation. A component bundle contains a component or an app and all its related resources, including helpers and documentation
  • What is a benefit of the Lightning Component framework? Better performance for custom Salesforce mobile apps. The Lightning Component framework has out-of-the-box components that function seamlessly with mobile devices.

  • Which tag do you use to display individual fields from a record? Lightning:outputField
  • Lightning components are available in what three products? Salesforce Mobile App, Communities, Lightning Experience
  • What is the suffix for a Lightning Component resource? .cmp
  • Do Lightning components provide an auto-subscription mechanism for platform events? No, they do not