Online Training (Apex, Visualforce, Lightning Components) Flashcards

1
Q

Force.com is multi-tenant. What does this statement mean?
A. Applications share hardware, storage, and other infrastructure.
B. Requires expensive infrastructure but allows resource sharing.
C. Applications can be deployed at multiple locations.
D. Applications from different organizations gets their own technology architecture.

A

A. Applications share hardware, storage, and other infrastructure.

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

True/false: All configurations and customization in Force.com are represented as metadata.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
Identify the advantages of declarative customization (Select all that apply):
A. Enhanced security.
B. Ease of upgrades.
C. Ease of maintenance.
D. Offers the most flexibility.
A

B. Ease of upgrades.

C. Ease of maintenance.

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

Match each requirement with the Service Cloud features that provide a solution.
Solution:
A. Apex.
B. Visualforce.
C. Metadata API.
D. Bulk API.
Requirement:
1. Write custom business logic.
2. Move configuration changes between sandbox and production environments.
3. Create pages with custom look and feel.
4. Load large amounts of data into the system.

A

A. Apex. - 1. Write custom business logic.
B. Visualforce. - 3. Create pages with custom look and feel.
C. Metadata API - 2. Move configuration changes between sandbox and production environments.
D. Bulk API. - 4. Load large amounts of data into the system.

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

Identify the differences between Apex and the other programming languages? (Select all that apply.)
A. Apex runs in a multi-tenant environment.
B. Apex performs uncontrolled program invocations.
C. Apex is case-insensitive.
D. Apex can be processed on any platform.

A

A. Apex runs in a multi-tenant environment.

C. Apex is case-insensitive.

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

True/False: Classes are the blueprint for the creation of a single object.

A

False.

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

A developer needs to create a collection of last names in Apex. A sample of the values he needs to include are: “Barry”, “Lu”, “Bansal” and “Barry”. No other data is available for populating this list. Which type of collection should he use?
A. List
B. Map
C. Set

A

A. List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
At the end of the code, what is the price of bananas in newPrices map?
LINK TO CODE.
A. 20
B. 40
C. 60
D. 80
A

C. 60

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
Which syntax should you use to create a new public class name MyNewClass?
A. public class MyNewClass { }
B. class public MyNewClass { }
C. class MyNewClass {} public
D. MyNewClass { } public class
A

A. public class MyNewClass { }

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

True/False: The method to create an object out of a class definition is called a constructor.

A

True.

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

True/False: It is necessary to instantiate an instance of a class to access a static method of the class.

A

False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
Which statement is true about Apex.
A. A class cannot be disabled for profiles.
B. An inner class can be nested at multiple levels.
C. Static methods can only be declared in a top-level class definition.
D. The default access modifier for methods in a class is public.
A

C. Static methods can only be declared in a top-level class definition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
Which keywords should you specify to define a constant?
A. Static and exception
B. Static and final
C. Static and private
D. Exception and final
A

B. Static and final

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

Which of the following statements are true about a SOQL SELECT statment? (Select all that apply)
A. It is similar to the SELECT statement in SQL
B. It is used to perform searches across multiple sObjects
C. It helps retrieve records from an object in the Force.com database
D. It returns a list of lists of sObjects

A

A. It is similar to the SELECT statement in SQL

C. It helps retrieve records from an object in the Force.com database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
What are the two ways to insert SOQL into Apex? (Select all that apply)
A. Database.search() method
B. Square-bracket expressions
C. Search() method
D. Database.query() method
A

B. Square-bracket expressions

D. Database.query() method

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

Match the SQL keywords with the correct description.
Keyword:
A. Group By
B. Like
C. Not
D. Order By
Description:
1. Is used to select records using wildcards.
2. Is used to groups similar data and then provide summary information about the groups.
3. Is used to control the order of the query results.
4. Is used for negative conditions in a SOQL.

A

A. Group By - 2. Is used to groups similar data and then provide summary information about the groups.
B. Like - 1. Is used to select records using wildcards.
C. Not - 4. Is used for negative conditions in a SOQL.
D. Order By - 3. Is used to control the order of the query results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
Identify the clause that is used in a SOSL statement to limit results to specified object types.
A. IN
B. RETURNING
C. WHERE
D. ORDER BY
A

B. RETURNING

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

Identify the best solution to accomplish the following; Prevent the saving of duplicate candidate records in the database. The combination of Last Name and Email is enough to ensure that the records are unique.
A. Declarative
B. Programmatic

A

A. Declarative

- Done by creating a unique text field on the object - updated by a workflow.

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

Identify the best solution to accomplish the following; Restrict the Position-Salary relationship to one-to-one, so that each Position only has one set of Salary data and vice versa.
A. Declarative
B. Programmatic

A

A. Declarative

- Done by creating a unique text field on Salary object - updated by a workflow.

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

Identify the best solution to accomplish the following; Update the Job Application status when creating a job offer (task details).
A. Declarative
B. Programmatic

A

B. Programmatic

- Done by creating a trigger on Offer, which updates the fields needed on the Job Application.

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

True/false: The before trigger can be used to access system-updated field values and affect changes in other records.

A

False

22
Q

Match the keywords with the correct definition.
Keyword:
A. new
B. size
C. oldMap
D. newMap
Definition:
1. Is used to return the total number of new and old records.
2. Is a collection that returns a list for the new versions of the sObject records.
3. Returns a map relating the record IDs to the existing records in the database.
4. Returns a map of IDs for the new versions of sObject records.

A

A. new - 2. Is a collection that returns a list for the new versions of the sObject records.
B. size - 1. Is used to return the total number of new and old records.
C. oldMap - 3. Returns a map relating the record IDs to the existing records in the database.
D. newMap - 4. Returns a map of IDs for the new versions of sObject records.

23
Q

True/false: An upsert event is associated with two separate events, delete and update.

A

False.

- Insert and update

24
Q
How many times will a trigger execute for 1001 records.
A. 5
B. 6
C. 10
D. 11
A

B. 6

25
Q

True/false: The anonymous blog cannot include the static keyword.

A

True.

26
Q
Which of the following statements identifies the block of code that can handle a particular exception?
A. catch
B. finally
C. try
D. throw
A

A. catch

27
Q

Identify the true statement about system logs. (Select all that apply)
A. The Apex debug statement output is written in system log.
B. System log records errors and system processes that occur in an organization.
C. System log contains the stack trace of any uncaught exceptions if system log is open and is executing Apex code.
D. System log contains variables in scope at the end of execution and their sizes.

A

A. The Apex debug statement output is written in system log.
B. System log records errors and system processes that occur in an organization.
C. System log contains the stack trace of any uncaught exceptions if system log is open and is executing Apex code.

28
Q

A good unit test must…
A. Not use the System.assert() methods.
B. Use at least five records to make the test execution meaningful.
C. Make calls to methods using both valid and invalid outputs.
D. Not check governor limits.

A

C. Make calls to methods using both valid and invalid outputs.

29
Q

True/false: Apex can never be directly created in a production environment.

A

True

30
Q
Match each type of testing with their correct time of occurrence.
Testing Type:
A. Unit Testing
B. Functional Testing
C. Integration Testing
D. Deployment
Occurrence:
1. After Integration Testing
2. Before Integration Testing
3. After Unit Testing 
4. After Staging
A

A. Unit Testing - 2. Before Integration Testing
B. Functional Testing - 1. After Integration Testing
C. Integration Testing - 3. After Unit Testing
D. Deployment - 4. After Staging

31
Q

True/false: You can call Web Services from external sources using SOAP Web Service Callouts.

A

True

32
Q

Which of the following guidelines are used for creating custom Web Services. (Select all that apply)
A. webservice methods must be static.
B. webservice methods cannot be overloaded.
C. A system-defined enum can be used anywhere in a webservice method.
D. All classes that contains methods defined with the webService keyword must be declared as private.

A

A. webservice methods must be static.

B. webservice methods cannot be overloaded.

33
Q
Identify the XMLStream classes that provide method to read and write XML strings. (Select all that apply)
A. XMLStreamWriter
B. XMLWriter
C. XMLStreamReader
D. XMLReader
A

A. XMLStreamWriter

C. XMLStreamReader

34
Q
Identify the classes that you can use to make HTTP or RESTful callouts. (Select all that apply)
A. HTTP class
B. HTTPRequest class
C. HTTPServerRequest class
D. HTTPResponse class
E. HTTPServerResponse class
A
B. HTTPRequest class
D. HTTPResponse class
35
Q

Sequence the steps to set up an inbound email service.

  1. Configure the email service
  2. Test the class
  3. Generate target email adresses
  4. Complete the email handler class
  5. Create the shell of an email handler class
A
  1. Create the shell of an email handler class
  2. Configure the email service
  3. Generate target email adresses
  4. Complete the email handler class
  5. Test the class
36
Q

Identify the true statement about email messages. (Select all that apply)
A. You can restrict the domains from which an email service can receive emails.
B. Inbound email service allows binary attachments only.
C. Email sent using Apex to internal Salesforce users count against the org email limits for the day.
D. You can use email templates to send mass emails to users.
E. Multiple email addresses can be generated per service.

A

A. You can restrict the domains from which an email service can receive emails.
E. Multiple email addresses can be generated per service.

37
Q

Which of the following statements are true about components of dynamic Apex. (Select all that apply)
A. Schema describe is a way to programmatically learn about the metadata of the datamodel within Apex.
B. Dynamic SOQL refers to the creation of a SOQL string before runtime within an Apex script.
C. In dynamic SOQL, you can use the escapeSingleQuotes method to prevent SOQL injection.
D. You can use dynamic SOSL to create a tree structure of all the objects and fields in your schema browser.

A

A. Schema describe is a way to programmatically learn about the metadata of the datamodel within Apex.
C. In dynamic SOQL, you can use the escapeSingleQuotes method to prevent SOQL injection.

38
Q

Sequence the steps to execute a code that generates schema describe.

  1. Generate the describe result for the sObject.
  2. Determine the sObject you need to access.
  3. Generate a list or map of tokens for the sObjects in your organization.
  4. Generate a map of field tokens for the sObject.
  5. Generate the describe result for the field the script needs to access.
A
  1. Generate a list or map of tokens for the sObjects in your organization.
  2. Determine the sObject you need to access.
  3. Generate the describe result for the sObject.
  4. Generate a map of field tokens for the sObject.
  5. Generate the describe result for the field the script needs to access.
39
Q
What type of content can you include in a Visualforce page? (Select all that apply)
A. Text
B. HTML
C. JavaScript
D. Flash
A

A. Text
B. HTML
C. JavaScript
D. Flash

40
Q

How can you tell a Visualforce component from another type of tag?
A. The apex prefix to the tag name.
B. They are always enclosed in start and end visualforce tags.
C. The are always preceded by a JavaScript event.
D. The component=”componentvalue” attribute.

A

A. The apex prefix to the tag name.

41
Q
Where do attributes to Visualforce tags appear?
A. On the line following the start tag
B. In brackets, directly after the tag
C. After the tag name in the start tag
D. With the JavaScript event for the tag
A

C. After the tag name in the start tag

42
Q

True/false: Action bindings refer to other Visualforce components.

A

False

- Action bindings refer to action methods in the controller.

43
Q

True/false: Data bindings pulls in data from the data set.

A

True

- The data set is made available by the controller.

44
Q

Identify the true statement about data methods.
A. Data methods perform logic.
B. Data methods include navigation actions.
C. Data methods are used to interact with data stored in the database.

A

C. Data methods are used to interact with data stored in the database.

45
Q
Which type of controller requires the developer to define all action methods?
A. Standard controllers
B. Custom controllers
C. Controller extensions
D. Both standard and custom controllers
A

B. Custom controllers

46
Q

Identify the true statement about controllers.
A. Only standard objects have an associated standard controller.
B. Custom controllers provide access to standard Salesforce data and behavior.
C. You cannot use both standard and custom controllers on the same page.
D. Controller extensions have a no-argument constructor.

A

C. You cannot use both standard and custom controllers on the same page.

47
Q

Identify the common feature in custom controllers and controller extension.
A. Both leverage existing data and actions
B. Both allow custom code to be used
C. Both require a no-argument constructor
D. Both execute in user mode by default

A

B. Both allow custom code to be used

48
Q
User A has permissions to run class X. Class X calls class Y and class Z. Identify the true statement about permissions.
A. User A can run class X. However, User A will need additional permissions on classes Y and Z.
B. User A will get an insufficient privileges error when class X calls class Y.
C. User A will be able to execute the code completely.
D. User A will not be able to execute any class.
A

C. User A will be able to execute the code completely.

49
Q

True/false: All custom components require a custom component controller.

A

False

- Only required when you need to decide how to render the component.

50
Q

Identify the effects of using transient keyword. (Select all that apply)
A. It reduces the size of the view state
B. It declares instance variables that can be saved
C. It frees up memory
D. It declares global variables

A

A. It reduces the size of the view state

C. It frees up memory

51
Q

True/false: Developers use multiple controllers to maintain the view state of the entire wizard.

A

False.