User Interface Flashcards

1
Q

The Review__c object has a lookup relationship up to the Job_Application__c object. The Job_Application__c object has a master-detail relationship up 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?

A. Utilize the standard controller for Position__c and expression syntax in the page to display related Review__c data through the Job_Application__c object.

B. Utilize the standard controller for Position__c and cross-object formula fields on the Job_Application__c object to display Review__c data.

C. Utilize the standard controller for Position__c and cross-object formula fields on the Review__c object to display Review__c data.

D. Utilize the standard controller for Position__c and a controller extension to query for Review__c data.

A

D. Utilize the standard controller for Position__c and a controller extension to query for Review__c data.

A controller extension is the way to query the Review child records while keeping the standard controller functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are two capabilities of a StandardSetController? (Select two answers.)

A. It allows pages to perform mass updates of records.

B. It allows pages to perform pagination with large record sets.

C. It extends the functionality of a standard or custom controller.

D. It enforces field-level security when reading large record sets.

A

A. It allows pages to perform mass updates of records.

B. It allows pages to perform pagination with large record sets.

The StandardSetController class also contains a prototype object. This is a single sObject contained within the StandardSetController class. If the prototype object’s fields are set, those values are used during the save action, meaning that the values are applied to every record in the set controller’s collection. This is useful for writing pages that perform mass updates.

StandardSetControllers have built-in pagination that helps reduce the number of records displayed on the page.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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? 

A. Use SOQL on the Visualforce page to query for data from the parent record.

B. Add a second standard controller to the page for the parent record.

C. Use a roll-up formula field on the child record to include data from the parent record.

D. Use merge field syntax to retrieve data from the parent record.

A

D. Use merge field syntax to retrieve data from the parent record.

You can use related merged fields to get the data from the parent record. The relative fields are prepended to __r.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are two reasons that a developer should use a custom Visualforce page in a Lightning Platform application? (Select two answers.)

A. To generate a PDF document with application data

B. To create components for dashboards and layouts

C. To deploy components between two organizations

D. To modify the page layout settings for a custom object

A

A. To generate a PDF document with application data

B. To create components for dashboards and layouts

Currently a Visualforce page is required to render a PDF document.

You can embed a Visualforce page anywhere in your Salesforce dashboard as a standard component.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the preferred way to reference web content such as images, stylesheets, JavaScript, and other libraries that are used in Visualforce pages?

A

Upload the content as a static resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the name of the controller for a Visualforce page that is used to override the standard Opportunity view button?

A

The Opportunity StandardController for pre-built functionality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which two tags do you use to load external JavaScript files into a Visualforce page?

A

< apex:includeScript > tag and < script > tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which two resources can you include in a Lightning component bundle? (Select two answers.)

A. Adobe Flash

B. Helper

C. Apex class

D. Documentation

A

B. Helper

D. Documentation

A component bundle contains a component or an app and all its related resources, including helpers and documentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a benefit of the Lightning Component framework?

A. It automatically replicates the classic Salesforce look and feel

B. Better integration with Salesforce Sites

C. More centralized control via server-side logic

D. Better performance for custom Salesforce mobile apps

A

D. Better performance for custom Salesforce mobile apps

The Lightning Component framework has out-of-the-box components that function seamlessly with mobile devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which tag do you use to display individual fields from a record?

A

< lightning:outputField >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Lightning components are available in what three products?

A

Salesforce Mobile App, Communities, and Lightning Experience

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the suffix for a Lightning Component resource?

A

.cmp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

True or False: Lightning Components provide an auto-subscription mechanism for platform events.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A developer should keep in mind the following about getter and setter methods except?

A. Getters methods may include increment a variable, write a log message, or add a new record to the database.

B. Any setter methods in a controller are automatically executed before any action methods.

C. While a getter method is always required to access values from a controller, it’s not always necessary to include a setter method to pass values into a controller.

D. Getter methods must always be named getVariable while setter methods must always be named setVariable.

A

A. Getters methods may include increment a variable, write a log message, or add a new record to the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A developer created a simple VF page calculator that has 2 numerical input fields and performs an arithmetic operation based on the user input. What method should the developer use in order to process and calculate the input of the user in the controller?

A. Process Method

B. Input Method

C. Setter Method

D. Pass Method

A

C. Setter Method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is true regarding a StandardSetController? Choose 3 answers.

A. Allow list controllers similar to pre-built Visualforce list controllers to be created

B. Allow pre-built list controllers similar to to be extended

C. Can be used for mass updates

D. The maximum record limit for StandardSetController is 1,000 records.

A

A. Allow list controllers similar to pre-built Visualforce list controllers to be created

B. Allow pre-built list controllers similar to to be extended

C. Can be used for mass updates

17
Q

There is a requirement to display the role and profile of the current user on a Visualforce page. How can this be done?

A. Access via global data directly using expression syntax in the Visualforce page

B. Add a query to the page controller and bind to a variable that is accessed from the Visualforce page

C. This is not possible

D. Use the < apex:userField > component

A

A. Access via global data directly using expression syntax in the Visualforce page

18
Q

A developer is creating a customized page in which the standard record detail page of an object is included. What Visualforce page component should the developer use?

A. < apex:detail >

B. < apex:datalist >

C. < apex:record >

D. < apex:page >

A

A. < apex:detail >

19
Q

What attribute should a developer use to associate a page with the standard controller for a custom object?

A. customController

B. standardController

C. visualController

D. controller

A

B. standardController

20
Q

The following statement is true about using the transient keyword in a custom controller except:

A. Use the transient keyword to declare instance variables that can’t be saved, and should not be transmitted as part of the view state for a Visualforce page.

B. Declaring variables as transient increases view state size.

C. Developer can use transient in classes that define the types of fields declared in the serializable classes.

D. The transient keyword can be use for a field on a Visualforce page that is needed only for the duration of a page reques

A

B. Declaring variables as transient increases view state size.

21
Q

What attribute should the developer use to render a Visualforce page as a PDF file?

A. docType=”pdf-1.0-strict”

B. contentType=”application/vnd.pdf”

C. docType=”pdf-5.0”

D. renderAs=”pdf”

A

D. renderAs=”pdf”

22
Q

Which of the following statements is true about defining getter methods?

A. The [get] method is used to pass data from Visualforce page to Apex controller.

B. Use the name of the getter method in an expression to display the results of a getter method in a page.

C. Every value that is calculated by a controller and displayed in a page must have a corresponding getter method

D. Getter methods are suggested to include logic that increments a variable, write a log message, or add a new record to the database.

A

C. Every value that is calculated by a controller and displayed in a page must have a corresponding getter method

23
Q

A component bundle contains a component or an app and all its related resources. Which of the following resource do not belong to the standard component bundle?

A. Documentation

B. Renderer

C. Image and Animations

D. CSS Styles

E. Helper

A

C. Image and Animations