Platform Developer I Flashcards

1
Q

A custom object has a workflow rule that updates a field when a certain set of criteria is met. A ‘before update’ Apex trigger has also been defined on the object. What will happen when a user updates a record so that it meets the criteria of the workflow rule?
Choose 1 answer.

A. An exception will be thrown due to a conflict between the two
B. Both will be fired only once
C. The Apex trigger will be fired twice
D. The Apex trigger will be fired first, voiding the Workflow Rule due to the order of execution

A

C. The Apex trigger will be fired twice

  • According to the order of execution, ‘before’ triggers are run, ‘after’ triggers are run, and then workflow field updates are processed. If a field is updated due to a workflow rule, ‘before update’ and ‘after update’ triggers are run again one more time, and only one more time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A developer is using debug logs to track the business processes that are run automatically in an organization. Which of the following are valid considerations for setting up a trace flag on the Platform Integration User for this use case?
Choose 2 answers.

A. A trace flag can be set on the Platform Integration User to track certain business processes that integrate internal applications.
B. Automated processes such as workflow and assignment rules can be traced using the Platform Integration User.
C. The Platform Integration User is displayed in audit fields when data is synchronized using the Salesforce Integration Cloud.
D. A trace flag can be set on the Platform Integration User to track certain processes created using the Process Builder.

A

A. A trace flag can be set on the Platform Integration User to track certain business processes that integrate internal applications
C. The Platform Integration User is displayed in audit fields when data is synchronized using the Salesforce Integration Cloud.

  • The Platform Integration User is created automatically by Salesforce and the user detail record cannot be maintained.
  • Some internal Salesforce applications automatically run their business processes as the Platform Integration User.
  • The Platform Integration User shows up in audit fields in the following cases:
    1) When an Einstein bot creates a case.
    2) When Einstein writes prediction data to records that it is evaluating.
    3) When data is synchronized using the Salesforce Integration Cloud.
  • Automated processes associated with the process builder, workflow rules, and assignment rules cannot be traced using a debug log by setting up a trace flag on the Platform Integration User.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An administrator is trying to send emails to certain users from a sandbox using a workflow email alert, but he has found that emails are not being sent. What action should he take?
Choose 3 answers.

A. Check the email addresses
B. Check Email Deliverability setting
C. Check the Email Logs
D. Check the Workflow Logs
E. Check the System Logs
A

A. Check the email addresses
B. Check Email Deliverability setting
C. Check the Email Logs

  • The email deliverability setting can prevent emails from getting sent if it is set to ‘No Access’ or ‘System Email’ only.
  • The Email Logs can provide information on whether the email was sent or an error was encountered in the delivery.
  • Email invalidation can also prevent production users from receiving generated messages from the sandbox. When a sandbox is created or refreshed, the email address name@email.com becomes name@email.com.invalid. The administrator should check and make sure that the target users have the correct email address.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A developer would like to create a new sObject with default values using the describe information of a similar sObject. Which of the following can be used to obtain information about the type of sObject from an sObject describe result?
Choose 1 answer.

A. getSObject()
B. getType()
C. getSObjectName()
D. getSObjectType()

A

D. getSObjectType()

  • The getSObjectType() method returns the Schema.SObjectType object for the sObject, which can be used to create a similar sObject using the newSObject() method.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Before deleting a record, a complex validation needs to be performed to confirm that the record can be deleted by querying a number of objects. What solution would be most appropriate in this situation?
Choose 1 answer.

A. Flow
B. Validation Rule
C. Apex Trigger
D. Process Builder

A

C. Apex Trigger

  • An APEX trigger would need to be used to perform validation logic upon record deletion, and if the validation fails, stop the deletion action.
  • Process Builder cannot be used on record deletion.
  • A flow cannot triggered by a record deletion. It has to be triggered by something else such as a button click / link / process / apex.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the recommended tools for deploying metadata from one environment to another?
Choose 3 answers.

A. Visualforce Studio Code
B. Ant Migration Tool
C. Change Sets
D. Data Loader
E. Unmanaged Packages
A

A. Visualforce Studio Code
B. Ant Migration Tool
C. Change Sets

  • Built on top of the Metadata API, the Ant Migration Tool and Salesforce Extensions for Visual Studio Code are recommended tools for migrating metadata between related or unrelated orgs
  • Unmanaged Packages are intended for distributing open-source projects to developers.
  • Data Loader is used for importing or exporting records and not for migrating metadata.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following are valid Apex data types?
Choose 3 answers.

A. Enum
B. Blob
C. Currency
D. Text
E. ID
A

A. Enum
B. Blob
E. ID

Currency and Text are not valid data types. Instead of currency and text, a developer may use Decimal and String data types respectively.

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

A developer is required to create a customized page that displays data from a web service callout. What controller could the developer use?
Choose 2 answers.

A. Custom
B. Standard
C. Extension
D. Standard List

A

A. Custom
C. Extension

  • A Custom controller should be used as a controller is displaying data from a web service callout and this is not supported in standard controller actions.
  • Alternately, an extension can be used if the developer will utilize standard controller actions, and use the extension for adding new actions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A junior developer frequently experiences governor limit errors when running Apex Triggers. As a senior developer, which of the following are best practices that you could advise?
Choose 2 answers.

A. Use a combination of collections (e.g. maps, lists) and streamlined queries.
B. Use lists to perform DML operations on multiple records.
C. Use an Apex handler class for multiple triggers.
D. Use SOQL queries only within FOR loops.

A

A. Use a combination of collections (e.g. maps, lists) and streamlined queries.
B. Use lists to perform DML operations on multiple records.

  • Utilizing lists and maps to store data obtained from queries is a fundamental technique that is used to make Apex code more efficient.
  • A SOQL query can make use of the WHERE clause to query all the data required in Apex code.
  • Instead of using DML statements inside FOR loops to perform operations such as insert, update, or delete on individual records, they should be executed using collections outside FOR loops.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Global Insurance has custom objects to represent policies and claims. A policy can have zero or many claims. A claim is always related to a policy. Claims are first assigned to a queue and then later assigned to different members of the claims team. What type of relationship would be used to relate the policy and claim objects?
Choose 1 answer.

A. Self relationship
B. Master-detail relationship
C. Direct relationship
D. Lookup relationship

A

D. Lookup relationship

  • In this case, queues are required to manage and allocate claims. A queue requires an owner field, which is not available on child records in a master-detail relationship, so a lookup relationship between policy and claim would be required.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A developer working for Cosmic Solutions would like to propagate the deletion of a custom object from a developer sandbox to the production org used by the company. Which Salesforce feature or tool can be used for this requirement?
Choose 1 answer.

A. Unmanaged Package
B. Data Loader
C. Change Set
D. Ant Migration Tool

A

D. Ant Migration Tool

  • The Force.com Migration Tool for Apache Ant can be used for propagating destructive changes from one org to another.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a debug level?
Choose 1 answer.

A. The debug level specifies the type of information to record in the debug log
B. The debug level specifies the amount of information to record in the debug log
C. The debug level specifies the type of user the debug log will capture information for
D. The debug level specifies the set of log levels for log categories

A

D. The debug level specifies the set of log levels for log categories

  • A debug level is a set of log levels for debug log categories: Database, Workflow, Validation, and so on. You can reuse debug levels across your trace flags.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

You are about to deploy a package from UAT environment to Production with the following components:

7 Custom Objects
43 Custom Fields
15 Validation Rules
20 Apex Classes
5 Apex Triggers

What will happen during deployment, provided that running test is set to default?
Choose 1 answer.

A. Running test classes are not required.
B. All local tests are run during the deployment.
C. All local and managed packaged tests are run during the deployment.
D. No test are run during the deployment.

A

B. All local tests are run during the deployment.

  • For deployment to a production organization, all local tests in your organization are run by default.
  • Tests that originate from installed managed packages aren’t run by default.
  • If any test fails, the entire deployment is rolled back.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What method can be used to obtain metadata information about all the sObjects in an organization and their fields?
Choose 1 answer.

A. describeObjects()
B. describeSObjects()
C. getGlobalDescribe()
D. getGlobalSObjects()

A

C. getGlobalDescribe()

  • The getGlobalDescribe() method can be used to return a map of all sObject names (keys) to sObject tokens (values) for the standard and custom objects defined in an organization.
  • The describeSObjects() method can be used to obtain metadata (field list and object properties) for the specified sObject or array of sObjects.
  • The sObjects need to be specified when using this method.
  • There are no methods named describeObjects() and getGlobalSObjects().
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following statements about delete and undelete DML operations are true?
Choose 3 answers.

A. The undelete operation does not restore the record associations for parent cases.
B. When there is a master-detail relationship, if a parent record is deleted, its children are automatically deleted.
C. Salesforce can restore lookup relationships that have been replaced.
D. Parent accounts (as specified in the Parent Account field on an account) are supported by the undelete operation.
E. Restoring all custom lookup relationships is supported by the undelete operation.

A

B. When there is a master-detail relationship, if a parent record is deleted, its children are automatically deleted.
D. Parent accounts (as specified in the Parent Account field on an account) are supported by the undelete operation.
E. Restoring all custom lookup relationships is supported by the undelete operation.

  • Salesforce only restores lookup relationships that have not been replaced. For example, if an asset is related to a different product prior to the original product record being undeleted, that asset-product relationship is not restored.
  • Cascading deletions are supported; if a parent record is deleted, its children are automatically deleted, as long as each child record can be deleted, as in case of master-detail relationships.
  • The undelete operation restores the record associations for parent cases (as specified in the ‘Parent Case’ field on a case).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the following statements is true about defining getter methods?
Choose 1 answer.

A. Use the name of the getter method in an expression to display the results of a getter method in a page.
B. Getter methods are suggested to include logic that increments a variable, write a log message, or add a new record to the database.
C. Every value that is calculated by a controller and displayed in a page must have a corresponding getter method
D. The [get] method is used to pass data from Visualforce page to Apex controller.

A

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

  • The ‘set’ method should be used to pass data from Visualforce page to Apex controller. To pass data from an Apex controller to a Visualforce page, use the ‘get’ method.
  • The name of the getter method without the ‘get’ prefix should be used to display results from a getter method.
  • Also, getter methods should be designed to produce the same outcome, whether they are called once or multiple times for a single page request. It is a best practice for getter methods to be idempotent, that is, to not have side effects. For example, do not increment a variable, write a log message, or add a new record to the database. Visualforce does not define the order in which getter methods are called, or how many times they might be called in the course of processing a request.
  • Getter methods return values from a controller. Every value that is calculated by a controller and displayed in a page must have a corresponding getter method, including any Boolean variables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Project managers would like to be able to record the total amount of hours each team member works on projects. A team member can be related to multiple projects and each project can have multiple team members. How can the developer achieve this?
Choose 1 answer.

A. Create master detail relationships from a junction object ‘Project Team Member’, one to the Project object and one to the Team Member object
B. Create a master-detail relationship on Project and Team Member objects to a junction object ‘Project Team Member’.
C. Create a lookup relationship on both objects to a junction object called Project Team Member.
D. Create a master-detail relationship on the Project object to the Team Member object.

A

A. Create master detail relationships from a junction object ‘Project Team Member’, one to the Project object and one to the Team Member object

  • In this case, as a team member can be related to multiple projects and each project can have multiple team members, a many-to-many relationship is required.
  • Creating the many-to-many relationship consists of creating the junction object (e.g. Project Team Member) and creating two master-detail relationships on Project Team Member, one to Project and one to Team Member.
  • When creating master-detail relationships, the relationship field is created on the detail object.
  • The detail object in this case is Project Team Member.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are reasons for using a static method or variable?
Choose 3 answers.

A. To use a method or variable without instantiating its class
B. To access values of instance member variables of its class
C. To store information that is shared across instances of a class
D. To persist a variable value beyond the context of a single transaction
E. To create a utility method in a class
A
A. To use a method or variable without instantiating its class
C. To store information that is shared across instances of a class
E. To create a utility method in a class
  • Since all instances of the same class share a single copy of a static variable, it can be used to store information within the context of a transaction.
  • For example, a recursive trigger can use a static variable to determine when to exit the recursion by conditionally setting its value.
  • A static method can be used as a utility method and is not subject to instance member variables.
  • A static method or variable is accessed without instantiating the defining class.

Static variables only persist within the context of a single transaction. Static methods cannot access values of instance member variables of its class.

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

An organization’s Chief Technology Officer is concerned about the use of third-party images in Visualforce pages due to recent reports from business partners about images stealing usernames and passwords. Which function can a developer use to securely fetch images that are outside an org’s server and prevent them from requesting user credentials?
Choose 1 answer.

A. HTTPS
B. IMAGEURL
C. IMAGEPROXYURL
D. URLFOR

A

C. IMAGEPROXYURL

  • The IMAGEPROXYURL function allows secure retrieval of external images and prevents unauthorized requests for user credentials.
  • It can be used on the ‘src’ attribute of a tag or the value attribute of an object.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are some of the limitations of changing the data type of a custom field?
Choose 3 answers.

A. The file field type in Salesforce Knowledge can be changed as long as it is not referenced in a Apex Class.
B. The option to change the data type of a custom field is not available for all data types.
C. Developers cannot change the data type of a custom field if it is referenced in Apex.
D. Developers cannot change the data type of a custom field that is referenced by a Visualforce page.

A

B. The option to change the data type of a custom field is not available for all data types.
C. Developers cannot change the data type of a custom field if it is referenced in Apex.
D. Developers cannot change the data type of a custom field that is referenced by a Visualforce page.

  • In Salesforce Knowledge article types, the file field type cannot be converted into other data types.
  • The option to change the data type of a custom field is not available for all data types.
    • For example, existing custom fields cannot be converted into encrypted fields nor can encrypted fields be converted into another data type. Data type of fields that are referenced by Apex Class/Visualforce page cannot be changed easily.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Sending and receiving change sets can be done between which of the following?
Choose 2 answers.

A. Developer Sandbox to Production.
B. Developer Edition to Developer Edition
C. Developer Edition to Production.
D. Sandbox to Sandbox.

A

A. Developer Sandbox to Production.
D. Sandbox to Sandbox.

  • Change sets are not available in Developer Edition orgs.
  • Change sets are available in some editions, including Enterprise and Unlimited.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

A Visualforce page created by a developer needs to be added to a custom record page in Lightning Experience. However, the page uses Salesforce Classic styling which does not match the rest of the user interface. What should be done to ensure that the page uses Lightning Experience styling instead?
Choose 1 answer.

A. An option to switch to Lightning Experience styling needs to be enabled by editing the Visualforce page in Setup
B. The Visualforce page needs to be created again in Lightning Experience Setup
C. The ‘lightningStylesheets’ attribute should be set to ‘true’ in the tag
D. The tag should be used to include a custom style

A

C. The ‘lightningStylesheets’ attribute should be set to ‘true’ in the tag

  • Using would require creating a custom style sheet as a static resource. It would also make it harder to ensure that the page styling matches that of Lightning Experience.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What trigger context variable will return true if the current context for the Apex code is a trigger, not a Visualforce page, a Web service, or an executeanonymous() API call?
Choose 1 answer.

A. oldMap
B. isUndelete
C. isExecuting
D. isUpdate

A

C. isExecuting

  • The isExecuting context variable returns true if any code inside trigger context is executing.
  • This means you can test whether a particular trigger is executing or not by the help of this variable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. For which situation would a standard list controller be sufficient?
Choose 1 answer.

A. Run the Visualforce page entirely in system mode
B. Make a callout to an external web service
C. Using object record pagination.
D. Overriding existing standard functionality

A

C. Using object record pagination

  • You can add pagination to a page using a list controller by utilizing the ‘next’ and ‘previous’ actions using a StandardListController.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Which of the following components are not available to deploy using the Metadata API?
Choose 2 answers.

A. Global Picklist
B. Fiscal Year
C. Queues
D. Currency Exchange Rates

A

B. Fiscal Year
D. Currency Exchange Rates

  • Certain components cannot be retrieved or deployed with Metadata API, and changes to them must be made manually in each organization.
  • These include components such as
    • Account Teams
    • Case Team Roles
    • Currency Exchange Rates
    • Fiscal Years
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Universal Containers would like to see a Red / Yellow / Green Traffic Light representation on the Opportunity detail page, based on the value in the Opportunity Probability field. What would you use to achieve this?
Choose 1 answer.

A. Image Field
B. Master Detail Relationship
C. Rich Text Field
D. Formula Field

A

D. Formula Field

  • An image (stored in documents) can be displayed conditionally using a formula field using the IMAGE() function.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Which of the following statements are true about Apex generic exceptions and built-in exceptions?
Choose 3 answers.

A. The generic Exception catches all exception types except LimitException
B. The LimitException can be caught by using a combination of one or more Exception types.
C. NoAccessException occurs when there is a problem with unauthorized access such as trying to access an sObject that the current user does not have access to.
D. NullPointerException occurs when there is a problem with unauthorized access, such as trying to access an sObject when the current user does not have access to it.
E. QueryException occurs when there is a problem with SOQL queries.

A

A. The generic Exception catches all exception types except LimitException
C. NoAccessException occurs when there is a problem with unauthorized access such as trying to access an sObject that the current user does not have access to.
E. QueryException occurs when there is a problem with SOQL queries

  • The LimitException can never be caught.
  • So, the generic Exception will be able to catch all exception types except for LimitException.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Which of the following ways can be used to throw a custom exception?
Choose 3 answers.

A. throw new myCustomException().setMessage('Error Message Here');
B. throw new myCustomException('Error Message Here');
C. throw new myCustomException(e);
D. throw new myCustomException();
E. throw new myCustomException().addError('Error Message Here');
A
B. throw new myCustomException('Error Message Here');
C. throw new myCustomException(e);
D. throw new myCustomException();

You can construct exceptions:

  1. With no arguments: new MyException()
  2. With a single String argument that specifies the error message: new MyException(‘This is bad’)
  3. With a single Exception argument that specifies the cause and that displays in any stack trace: new MyException(e)
  4. With both a String error message and a chained exception cause that displays in any stack trace: new MyException(‘This is bad’, e)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Given the traditional FOR loop standard syntax:

for (initialization; exit_condition; increment) {
 statement(s)
}

How does the for-loop sequentially perform its operation?

I. The initialization expression initializes the loop.
II. The code block will be executed.
III. Evaluate the exit_condition. If true, the loop continues. If false, the loop exits.
IV. Execute the increment statement and evaluate the exit_condition again.
Choose 1 answer.

A. I, II, IV, III
B. III, I, II, IV
C. I, III, II, IV
D. I, II, III, IV

A

C. I, III, II, IV

  • First, the initialization statement will be executed. Multiple variables can be declared and/or initialized in this statement.
  • Then the exit_condition is evaluated. If the expression evaluates to true, the loop continues. If false, the loop exits.
  • Then the code block inside the loop will be executed. At the end of the code block, the increment expression will be executed.
  • Finally the exit_condition expression will be evaluated again, either continuing the loop, or exiting as determined by the evaluation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is the procedure for unit testing?
Choose 1 answer.

A. Create test data, call the method being tested, verify results
B. Create test data, call the method being tested, verify results, delete any records created
C. Create test data, run all tests, verify results, delete any records created
D. Create test data, run all tests, delete any records created, and verify the results

A

A. Create test data, call the method being tested, verify results

All unit tests follow the same steps:
1) Create test data
2) Call the Apex class method in the test method
3) Verify results
Data is not committed so it does not need to be deleted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q
An administrator working for Cosmic Solutions has created a formula field on the Opportunity object to calculate discount based on the values of some fields on the object. A developer who is using the formula field in an Apex class wants to determine whether it treats any blank number fields as zeros. Which method of the DescribeFieldResult class can be used to obtain the information for this use case?
Choose 1 answer.

A. isFormulaTreatNullNumberAsZero()
B. isFormulaTreatBlankNumberAsZero()
C. isFormulaNullNumberZero()
D. isFormulaBlankNumberZero()

A

A. isFormulaTreatNullNumberAsZero()

  • The isFormulaTreatNullNumberAsZero() method of the DescribeFieldResult class returns true if null is treated as zero in a formula field, and false otherwise.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

How can a developer check if the current user is able to view a particular field?
Choose 1 answer.

A. Use the isAccessible() method of the DescribeFieldResult Class
B. Use the isViewable() method of the DescribeField Class
C. Use the isViewable() method of the DescribeFieldResult Class
D. Use the isAccessible() method of the DescribeField Class

A

A. Use the isAccessible() method of the DescribeFieldResult Class

  • The isAccessible() method of the DescribeFieldResult class returns true if the current user can see the field.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

The developer executes the code below and an error is returned indicating that a variable is not properly declared.

String str = new String();
public void stringDisplay() {
 str = 'Hello';
 system.debug(str);
}

What is the proper way of declaring a String data type variable?
Choose 1 answer.

A. String new = str String();
B. String str;
C. String = str();
D. Text str;

A

B. String str;

  • String is a primitive data type, so it does not need to be instantiated with a new() command. It can be declared with or without an initial value:
    • String variableName; OR
    • String variableName = ‘value’
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

When to use an ‘after insert trigger’ (or after update) ?

A
  • Use only after insert, after update when you want update a field in second object if theres a change of field in the first object
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are the restrictions on object and fields when referenced into APEX ?

A
  • A custom object or field that is referenced in Apex or Visualforce page cannot be deleted
  • The datatype or API name of a custom field referenced by Apex code or Visualforce pages cannot be changed
  • There may be data loss in Apex code when length or decimal place of a field is modified
  • If schema relationships are modified, Apex code referring to relationships need to be updated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What are the reasons for which we would need some APEX or Visualforce coding <> declarative customization

A
  • Scheduled jobs
  • Complex reporting
  • Email processing
  • Automated record sharing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

In order to ensure that order records in Salesforce comply with a policy of Cosmic Sporting Goods, a Salesforce Consultant needs to display the conversion rate for an order’s currency on the order detail page. Which formula function can be utilized for this use case?
Choose 1 answer.

A. CURRENCY
B. CURRENCYRATE
C. CURRENTRATE
D. CONVERSIONRATE

A

B. CURRENCYRATE

  • The CURRENCYRATE formula function can be used in a formula field to return the conversion rate to the corporate currency for the given currency ISO code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Which of the following are true regarding developing in the Salesforce multi-tenant environment?
Choose 2 answers.

A. It is not possible to index application data as each tenant stores different types of data in the same application table
B. Queries need to be selective in terms of the number of records returned
C. Salesforce delivers polyglot persistence transparently
D. The custom domain feature ensures that different customers do not access each other’s data

A

B. Queries need to be selective in terms of the number of records returned
C. Salesforce delivers polyglot persistence transparently

  • Force.com integrates and optimizes several different data persistence technologies to deliver transparent polyglot persistence. Only a single API needs to be coded to, no matter which type of persistence is optimal for a given situation.
  • The platform monitors queries and DML operations and throws a runtime exception if they exceed governor limits.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Which of the following debug log sections contains the version of the API used during the transaction and the log category and level used to generate the log?
Choose 1 answer.

A. Header
B. Execution Units
C. Log Lines
D. Code Units

A

A. Header

A debug log has the following sections:

  • The header contains the version of the API used during the transaction and the log category and level used to generate the log.
  • An execution unit is equivalent to a transaction. It contains everything that occurred within the transaction. EXECUTION_STARTED and EXECUTION_FINISHED delimit an execution unit.
  • A code unit is a discrete unit of work within a transaction.
  • And, Log lines are included inside units of code and indicate which code or rules are being executed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

What is true regarding using the Visual Studio Code for deploying code?
Choose 2 answers.

A. Visual Studio Code can be used for deploying code but only from one sandbox to another
B. Visual Studio Code cannot be used for deploying code
C. Visual Studio Code can be used to deploy code to production
D. Visual Studio Code can be used to deploy specific metadata components to another org

A

C. Visual Studio Code can be used to deploy code to production
D. Visual Studio Code can be used to deploy specific metadata components to another org

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

A developer would like to reference a JavaScript library while developing a Lightning component. Which of the following considerations should be kept in mind while using an external JavaScript library for such a use case?
Choose 3 answers.

A. The library must be uploaded to Salesforce as a static resource
B. The ‘init’ event handler should be used to access scripts
C. A set of resources can be loaded using the ‘scripts’ attribute
D. A tag can be used in the .cmp or .app markup to reference the library
E. $Resource is used to include the name of the JavaScript resource

A

A. The library must be uploaded to Salesforce as a static resource
C. A set of resources can be loaded using the ‘scripts’ attribute
E. $Resource is used to include the name of the JavaScript resource

  • An external JavaScript library that needs to be used in a Lightning component must be uploaded as a static resource.
  • A tag is used in the .cmp or .app markup to include the resource.
  • $Resource is used to include the name of the static resource.
    For example, , where resourceName is the name of the static JavaScript resource.
  • The ‘scripts’ attribute can be used to load a set of resources using a comma-separated list.
  • The ‘init’ event handler should not be used to access the scripts since they load asynchronously and are most likely not available when the init event handler is called.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q
A developer has written an Apex class that performs some operation on newly created Opportunity records. However, it does not produce the desired result when users create new records. If five checkpoints have been set up in the class by the developer, how can the Checkpoint Inspector be utilized to debug the Apex class?
Choose 2 answers.

A. The Types panel shows the objects that were instantiated when a checkpoint was executed
B. The field values of an object’s instance can be viewed under the State panel
C. The Reference panel shows all symbols in memory at a particular checkpoint using a tree view
D. The Instances panel can be used to review the states of various objects at any checkpoint with the help of unique names

A

A. The Types panel shows the objects that were instantiated when a checkpoint was executed
B. The field values of an object’s instance can be viewed under the State panel

The Checkpoint Inspector has two tabs, namely, Heap and Symbols. The Heap tab shows the following three panels:

1) Types – It shows the objects that were instantiated and the memory consumed in bytes.
2) Instances – It shows the instances of a particular object type.
3) State – It shows the object’s fields and values at a particular checkpoint.

The Symbols tab displays all symbols in memory at a checkpoint using a tree view.

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

An administrator needs to get records with locations saved in geolocation or address fields as individual latitude and longitude values.
Which SOQL statement accomplishes this goal?
Choose 1 answer.

A. SELECT Id, Name, Location__latitude__c, Location__longitude__c FROM CustomObject__c
B. SELECT Id, Name, Location__r.latitude, Location__r.longitude FROM CustomObject__c
C. SELECT Id, Name, Location__latitude__s, Location__longitude__s FROM CustomObject__c
D. SELECT Id, Name, Location__r.latitude__c, Location__r.longitude__c FROM CustomObject__c

A

C. SELECT Id, Name, Location__latitude__s, Location__longitude__s FROM CustomObject__c

Records with locations saved in geolocation or address fields as individual latitude and longitude values can be retrieved by appending ‘__latitude__s’ or ‘__longitude__s’ to the field name, instead of the usual ‘__c’.

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

What method displays a custom error message on a particular record and prevents any DML operations thereafter?
Choose 1 answer.

A. throwError(errMsg)
B. clear(errMsg)
C. addError(errMsg)
D. add(errMsg)

A

C. addError(errMsg)

  • The addError(errMsg) method can be invoked at the record or field level within the trigger context to flag a record as invalid.
  • It marks a record with a custom error message and prevents any DML operations from occurring.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

A developer can write code to process records that allow successful inserts and record errors for unsuccessful inserts without rolling back the transaction. This is called partial processing. However, this method will not throw an exception. How should a developer handle the possible exceptions?
Choose 1 answer.

A. Use Database.SuccessResult Class
B. Use Database.ErrorResult Class
C. Use Database.EachResult Class
D. Use Database.SaveResult Class

A

D. Use Database.SaveResult Class

  • Partial processing returns the results of an insert or update operation in an array of Database.SaveResult objects.
  • One can loop through the array and determine which records failed or succeeded by using the isSuccess method of the SaveResult object.
  • The getErrors method is then used to get error information on the records that failed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What are the basic functions of a standard controller ?

A
  • Save, Edit, Cancel, Delete, QuickSave and List
  • Standard controllers exist for all main standard objects and a standard controller is created automatically for all new custom objects
  • 5 levels deep Child-Parent and 1 level deep Parent-Child
  • Controller extension is used to extend or override the standard controller functions and the logic is executed in User mode
  • Custom controller is used to add new functionality and it executes in system mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

A developer has a requirement to display a chart on the account page layout to help users visualize data. Which of the following statements are true about how charts could be incorporated into a Visualforce page?
Choose 3 answers.

A. A collection of standard components can be used to create Visualforce charts
B. Javascript charting libraries can be used
C. Google Charts can be integrated into Visualforce
D. Visualforce charts will display in Visualforce pages rendered as PDF

A

A. A collection of standard components can be used to create Visualforce charts
B. Javascript charting libraries can be used
C. Google Charts can be integrated into Visualforce

  • Visualforce charting uses JavaScript to draw the charts. Visualforce charts won’t display in pages rendered as PDFs.
48
Q

What are valid use cases for using a custom controller in a Visualforce page?
Choose 2 answers.

A. A Visualforce page needs to run in system mode.
B. A Visualforce page should replace the functionality of the standard controller.
C. A Visualforce page needs to add new actions to a standard controller.
D. A Visualforce page should override the save action of the standard controller.

A

A. A Visualforce page needs to run in system mode.

B. A Visualforce page should replace the functionality of the standard controller.

49
Q

Which of the following are valid reasons for considering an AppExchange app?
Choose 3 answers.

A. An existing app may solve the business problem, meaning a custom solution does not need to be developed
B. An existing unmanaged package app may meet most of the requirements and can be further customized
C. AppExchange apps include support for Salesforce mobile app
D. AppExchange apps will not affect organization limits

A

A. An existing app may solve the business problem, meaning a custom solution does not need to be developed
B. An existing unmanaged package app may meet most of the requirements and can be further customized
C. AppExchange apps include support for Salesforce mobile app

  • Apps can either be managed or unmanaged packages, and overall limits are affected in different ways depending on the type of package.
50
Q

What are the considerations when building Lightning components?
Choose 3 answers.

A. Lightning Web Components and Aura components can coexist on the same page.
B. Lightning Web Components are custom HTML elements using HTML and modern JavaScript.
C. Lightning Web Components can contain Aura Components as child components.
D. The Developer Console is used for building Lightning Web Components.
E. Lightning components can be built using the Lightning Web Component model and the Aura Component model.

A

A. Lightning Web Components and Aura components can coexist on the same page.
B. Lightning Web Components are custom HTML elements using HTML and modern JavaScript.
E. Lightning components can be built using the Lightning Web Component model and the Aura Component model

  • Lightning Web Components come with custom HTML elements using HTML & JavaScript and uses the W3C Web Components standard such that they run natively in browsers, are lightweight and provide optimal performance.
  • In order to build a Lightning Web Component, an external code editor is required, Lightning web components cannot be developed in the Developer Console.
  • Lightning Web Components cannot contain Aura Components, but Aura Components can contain Lightning Web Components.
51
Q

A developer is exploring the capabilities of Tooling API while working on the development of an app. Which of the following are the typical use cases of Tooling API?
Choose 3 answers.

A. Committing changes to a Salesforce org
B. Creating the definition of a custom object
C. Accessing code coverage test results for an Apex class
D. Deploying setup configurations into a production org using an XML file
E. Using ApexLog to access a debug log
A
A. Committing changes to a Salesforce org
C. Accessing code coverage test results for an Apex class
E. Using ApexLog to access a debug log
  • Tooling API can be used for fine-grained access to an org’s metadata.
  • Its main use cases include source control integration, continuous integration, and deployment of Apex classes and triggers.
  • Some specific tasks that can be accomplished using Tooling API are accessing a debug log, accessing code coverage results for an Apex class, and committing changes to a Salesforce org.
  • For simple migrations using an XML file, or retrieving, deploying, creating, updating or deleting metadata such as the definition of a custom object, Metadata API is typically used.
52
Q

Cosmic Solutions would like to define a business process with the following requirements:
1) The business process should be triggered automatically when the stage of an opportunity is set to ‘Closed Won’.
2) Some fields on a related record of a custom object called ‘Sale’ should be updated.
3) A custom object that is used to store sales orders should be updated with data from an external order management system.
Which of the following are valid considerations when using a process that invokes a flow to meet these requirements?
Choose 2 answers.

A. The flow invoked by the process should not be auto-launched
B. The process would need to be used to update Salesforce data
C. The flow can look up data stored in the external system
D. The flow can access both Salesforce data and external data

A

C. The flow can look up data stored in the external system
D. The flow can access both Salesforce data and external data

  • An external object can be created in Salesforce using Salesforce Connect.
  • The external object would allow accessing data stored in the external order management system.
  • The flow can look up external object data as well as Salesforce data. It can also be used to update Salesforce data.
  • External objects are supported by event processes, invocable processes, screen flows, and auto-launched flows.
    For instance, a process can be created to receive a platform event message.
    The process can then identify the related external object defined in the org by matching a field in the event message received.
53
Q

What information can the log inspector contain?
Choose 3 answers.

A. Methods
B. Execution Overview
C. Source
D. Stack Tree
E. Trace Flags
A

B. Execution Overview
C. Source
D. Stack Tree

  • The Log Inspector is a context-sensitive execution viewer that shows the source of an operation, what triggered the operation, and what occurred afterward.
  • Use this tool to inspect debug logs that include database events, Apex processing, workflow, and validation logic.
  • The Log Inspector can contain any of the following panels: Stack Tree, Execution Stack, Execution Log, Source, Variables & Execution Overview
54
Q

Test methods don’t have access by default to pre-existing data in the organization except for which of the following?
Choose 3 answers.

A. Record Types
B. Custom Objects
C. Custom Setting data
D. Users
E. Profiles
A

A. Record Types
D. Users
E. Profiles

  • Objects that are used to manage your organization or metadata objects can still be accessed in your tests such as: Users, Profile, Organization, RecordType
55
Q

A developer is required to override the standard Opportunity view button using a Visualforce page. What should the developer do?
Choose 1 answer.

A. Use the StandardListController
B. Use a custom controller and replicate the opportunity detail page
C. Use a controller extension
D. Use the Opportunity StandardController

A

D. Use the Opportunity StandardController

  • When overriding buttons with a Visualforce page, you must use the standard controller for the object on which the button appears.
  • For example, if you want to use a page to override the View button on opportunity, the page markup must include the standardController=”Opportunity” attribute on the tag.
  • A controller extension can also be used when you need to add extra functionality to the Visualforce page that you are using as an override.
56
Q

A developer created a trigger with the following code below:

trigger lineItemPerInvoice on Invoice_Statement__c (before insert, before update) {
 for(Invoice_Statement__c inv : trigger.new) {
  List liList = [SELECT Id, Units_Sold__c FROM LineItem__c WHERE Invoice_Statement__c IN: inv];
  for(LineItem__c li : liList) {
   //do logic here
  }
 }
}

What is true about the code snippet?
Choose 3 answers.

A. When updating more than 100 Invoice statement records, it will throw a run time exception for exceeding the governor limit for SOQL queries.
B. The SOQL query performed inside the loop retrieves the Line item for each invoice statement.
C. The trigger bypasses the problem of having the SOQL query called for each item.
D. The trigger has only one SOQL query performed and is still within the governor limits
E. The trigger shows an example of inefficient querying of child items.

A

A. When updating more than 100 Invoice statement records, it will throw a run time exception for exceeding the governor limit for SOQL queries.
B. The SOQL query performed inside the loop retrieves the Line item for each invoice statement.
E. The trigger shows an example of inefficient querying of child items.

  • The SOQL query performed is not one, but depends on the number of records on Trigger.new context, hence, this will not bypass the problem of having the SOQL query called for each item.
57
Q

Steadfast Insurance Inc. has a custom object [Claim] to track insurance claims for its team members. When a team member creates a claim record, an approval process is started which is used by the insurance manager to approve or reject the claim. In order to assist the manager, a team member’s claim limit, which is a custom field on the User object, should be displayed on the claim record. How can this be developed?
Choose 1 answer.

A. Use a field update in a workflow rule to copy the team member’s claim limit onto the claim record
B. Use a trigger to populate the user limit field when the claim is created
C. Use Process Builder to populate the user limit field when the claim is created
D. Use a cross-object formula to display the user’s limit on the claim record

A

D. Use a cross-object formula to display the user’s limit on the claim record

  • Cross-object formulas can reference fields on related records. In this case, the claim limit can be made available to the claim record by using a cross-object formula through Claim > Owner (User) > Claim Limit.
58
Q

Support agents of Cosmic Service Solutions use a custom console app in Lightning Experience to manage multiple records on a single screen. A developer has created a Visualforce page that allows users to input data related to cases. Which of the following actions are supported for overriding with the Visualforce code in the console app?
Choose 2 answers.

A. View
B. Edit
C. Delete
D. Create

A

A. View
B. Edit

  • Visualforce overrides are supported for new, edit, view, tab, list, and clone actions in Lightning console apps.
  • They are not currently supported for delete and custom actions.
59
Q

Which of the following can be used to update existing standard and custom fields on child records automatically when a parent record is modified?
Choose 2 answers.

A. Process Builder
B. Apex Trigger
C. Workflow Rule
D. Formula field

A

A. Process Builder
B. Apex Trigger

  • Process Builder can be used to update related records including child records.
  • An Apex Trigger can also be used to update related child records automatically.
  • A Workflow Rule can be used to update only the master record that is related to the child record, using a cross-object field update action.
  • Although a cross-object formula field can be used to reference and display values in merge fields from a parent object if an object is on the detail side of a master-detail relationship, it cannot be used to ‘update’ existing fields on the detail records.
60
Q

A developer is unable to delete a custom field as it is referenced somewhere in Salesforce. Which of the following might contain the conflicting reference?
Choose 3 answers.

A. Apex Class
B. Workflow Field Update
C. Formula field
D. Dynamic SOQL

A

A. Apex Class
B. Workflow Field Update
C. Formula field

  • Below is a list of some of the components that when a field is referenced, the reference should be deleted or updated first before the field can be deleted: Apex Class, Apex Trigger, Visualforce Page, Visualforce Component, Workflow Rule, Field Update, Criteria-Based Sharing Rule, Flow, Jobs, etc.
61
Q

What are valid uses of Visualforce?
Choose 3 answers.

A. To embed a report chart into a page layout
B. To create a dashboard component
C. To create a custom chart using application data
D. To create a step-by-step wizard

A

B. To create a dashboard component
C. To create a custom chart using application data
D. To create a step-by-step wizard

  • Visualforce can be used to create wizards, custom charts, components for dashboards and page layouts and to generate pdf documents.
  • Embedding a report chart in a page layout can be done (without Visualforce) using standard configuration of a page layout.
62
Q

How can a developer query a multi-select picklist?
Choose 2 answers.

A. Picklist values can only be specified with AND logic
B. Picklist values can only be specified with OR logic
C. Picklist values can be specified with AND / OR logic
D. Semicolon and comma characters can be used to add filters for the multi-select picklist field to the SOQL query

A

C. Picklist values can be specified with AND / OR logic
D. Semicolon and comma characters can be used to add filters for the multi-select picklist field to the SOQL query

  • The Semicolon and Comma characters can be used to add filter values to multi-select picklist fields. A semicolon is used as a special character to specify AND. For example, the following notation: ‘AAA;BBB’ means ‘AAA’ and ‘ BBB’
  • A comma is used as a special character to specify OR. For example, the following notation: ‘AAA,BBB’ means ‘AAA’ or ‘BBB’:
63
Q

When would a full copy sandbox be required?
Choose 2 answers.

A. Performance and Load Testing
B. Staging
C. Integration Testing
D. Training

A

A. Performance and Load Testing
B. Staging

  • Full sandboxes are required only for performance and scalability testing, as well as for staging before final deployment.
  • A staging environment (stage) is a nearly exact replica of a production environment for software testing.
  • Staging environments are made to test codes, builds, and updates to ensure quality under a production-like environment before application deployment.
64
Q

There are a number of standard objects that don’t support DML operations. Which of these standard objects are not supported by DML Operations?
Choose 2 answers.

A. Record Type
B. Opportunity Line Item
C. Profile
D. User

A

A. Record Type
C. Profile

  • In Salesforce, some standard objects do not support DML operations but can still be queried.
  • Profile and Record Type are both examples of these.
65
Q

Which of the following statements are true in regards to a Partial Copy and Full Copy Sandbox?
Choose 2 answers.

A. A Partial copy is best to use for performance and load testing
B. A Full copy sandbox has a shorter refresh interval than a Partial copy
C. A Full copy sandbox supports templates
D. A Partial copy sandbox can store less data than a full copy sandbox

A

C. A Full copy sandbox supports templates
D. A Partial copy sandbox can store less data than a full copy sandbox

  • A partial copy sandbox can also include up to 5 GB of data, which is about 2.5 million records, with a maximum of 10,000 records per object.
  • A Full Copy sandbox can store the same amount of data as the production org.
  • A sandbox template can be applied to a full copy sandbox to ensure that it only contains the records required.
66
Q

Which statement is true about overriding standard action buttons?
Choose 1 answer.

A. The New, View, and Edit buttons can all be overridden for Salesforce Classic, Lightning Experience, and Mobile in one consolidated action override screen.
B. Buttons that appear on the edit page of a record can be overridden.
C. If the Delete button on an object is overridden with a Visualforce page, and the object has a delete trigger, clicking Delete will always fire the trigger.
D. The New, View and Edit buttons can all be overridden in separate action screens.

A

A. The New, View, and Edit buttons can all be overridden for Salesforce Classic, Lightning Experience, and Mobile in one consolidated action override screen.

  • One of the limitations is that the buttons available on the edit page of an object such as Save and Cancel cannot be overridden.
  • If the Delete button has been overridden with a Visualforce page, it will be up to that Visualforce page to proceed with or prevent the deletion of the record. So, the delete trigger is not always necessarily fired in this case.
67
Q

Which are true regarding a StandardSetController?
Choose 3 answers.

A. Allow pre-built list controllers to be extended
B. The maximum record limit for StandardSetController is 1,000 records.
C. Can be used for mass updates
D. Allow list controllers similar to pre-built Visualforce list controllers to be created

A

A. Allow pre-built list controllers to be extended
C. Can be used for mass updates
D. Allow list controllers similar to pre-built Visualforce list controllers to be created

  • StandardSetController objects allow you to create list controllers similar to, or as extensions of, the pre-built Visualforce list controllers provided by Salesforce.
68
Q

Which of the following are valid use cases of Apex code?
Choose 3 answers.

A. Triggers
B. Custom button with Javascript
C. Web Service
D. Server-side calls from custom Lightning components
E. Visualforce pages with standard controllers

A

A. Triggers
C. Web Service
D. Server-side calls from custom Lightning components

  • Visualforce pages with standard controllers do not need Apex code.
69
Q
Which static methods can be used in a test class to test governor limits?
Choose 1 answer.

A. Test.setFixedSearchResults()
B. Test.isTest() and Test.isnotTest()
C. Test.startTest() and Test.stopTest()
D. Test.runAs() and Test.getLimits()

A

C. Test.startTest() and Test.stopTest()

70
Q

A developer is required to create an Apex Trigger to populate the KeyPerson__c field on the Case object based on field values in its related Account record. In which trigger should this be created?
Choose 2 answers.

A. After insert
B. Before update
C. After update
D. Before insert

A

B. Before update
D. Before insert

  • You can use an object to change its own field values using trigger.new, but only in before triggers.
  • In all after triggers, trigger.new is not saved, so a runtime exception is thrown.
71
Q
You need to deploy an Apex class and test class to a production org but only have limited time. You decide to run selected tests. Which of the following are true about running selected tests?
Choose 2 answers.

A. Code coverage is computed for each class and trigger individually and is different than the overall coverage percentage.
B. If the code coverage of an Apex component in the deployment is less than 75%, the deployment fails.
C. Running selected or specified tests is only available in Metadata API.
D. Individual test methods can also be specified.

A
A. Code coverage is computed for each class and trigger individually and is different than the overall coverage percentage.
B. If the code coverage of an Apex component in the deployment is less than 75%, the deployment fails.
72
Q

In Apex, an expression is a construct made up of variables, operators, and method invocations that evaluates to a single value. Which of the following are valid Apex expressions?
Choose 3 answers.

A. new List()
B. @future
C. myClass.myMethod()
D. 3 + 4

A

A. new List()
C. myClass.myMethod()
D. 3 + 4

  • Apex expressions can be a literal expression, a new sObject, Apex object, list, set, or map, or a static or instance method invocation.
  • @future is an annotation to identify methods that are executed asynchronously.
73
Q

You have a requirement to associate a project manager to a project record. Project managers are defined as users in the application. What type of relationship would be most appropriate?
Choose 1 answer.

A. Many-to-many Relationship
B. Master Detail Relationship
C. Hierarchical Lookup Relationship
D. Lookup Relationship

A

D. Lookup Relationship

  • A lookup relationship field can be defined on the project record that can lookup the standard User object. A master-detail relationship in which the User object is the master cannot be created.
74
Q

A developer would like to relate an external data object (Social Media Posts) to the contacts object in Salesforce to track every post the contact has made in the external platform. How can the developer achieve this?
Choose 1 answer.

A. Create an indirect lookup relationship using a custom field with External ID and Unique attributes
B. Create a lookup relationship and update the record ID through integration
C. Create an external lookup relationship using a custom field with External ID and Unique attributes
D. Create a master-detail relationship and update the record ID through integration

A

A. Create an indirect lookup relationship using a custom field with External ID and Unique attributes

  • An indirect lookup relationship links a child external object to a parent standard or custom object.
  • When you create an indirect lookup relationship field on an external object, you specify the parent object field and the child object field to match and associate records in the relationship.
  • Specifically, you select a custom unique, external ID field on the parent object to match against the child’s indirect lookup relationship field, whose values come from an external data source.
75
Q

A developer has written the following Apex code statement to obtain the describe result for an sObject in Salesforce:

Schema.DescribeSObjectResult dsr = Schema.SObjectType.Account;

Which of the following methods can be used to return a map of developer names of the record types associated with the sObject and their metadata information?
Choose 1 answer.

A. getRecordTypes()
B. getRecordTypeInfosByName()
C. getRecordTypeInfos()
D. getRecordTypeInfosByDeveloperName()

A

D. getRecordTypeInfosByDeveloperName()

  • The getRecordTypeInfosByDeveloperName() method of the DescribeSObjectResult class returns a map that matches developer names to their associated record type
  • The getRecordTypeInfos() method returns a list of the record types, and the getRecordTypeInfosByName() method returns a map that matches the record labels to their associated record types.
76
Q

What are considerations for deciding between using Data Loader and the Data Import Wizard for loading data into a development environment?
Choose 3 answers.

A. If triggers should run on import of the data
B. If the object is supported by the Data Import Wizard
C. The number of records to be loaded
D. If the data will need to be loaded multiple times

A

B. If the object is supported by the Data Import Wizard
C. The number of records to be loaded
D. If the data will need to be loaded multiple times

  • Mappings cannot be saved with the data import wizard, so data loader is more suitable for loading data multiple times.
  • Triggers will run if data is loaded via the data import wizard or data loader.
  • The Data Import Wizard has the option to avoid running workflow rules and processes for new and updated records, but not triggers.
77
Q

What is the correct syntax for a Do While procedural loop?
Choose 1 answer.

A. do {statement} while (Boolean_condition);
B. while (Boolean_condition){ do {statement}}
C. do {while (Boolean_condition); statement;}
D. do {statement; while (Boolean_condition);}

A

A. do {statement} while (Boolean_condition);

do {
statement
} while (Boolean_condition);

  • The do-statement block needs curly braces and it does not check the Boolean condition statement until after the first loop is executed, therefore, the do-statement block is always executed once.
78
Q

A developer would like to return the developer name of a particular record type using a method of the ‘RecordTypeInfo’ class. Which method is available for this use case?
Choose 1 answer.

A. getName()
B. getRecordTypeInfosByName()
C. getRecordTypeInfosByDeveloperName()
D. getDeveloperName()

A

D. getDeveloperName()

  • The getDeveloperName() method of the RecordTypeInfo class can be used to return the developer name of a particular record type.
  • The getName() method returns the UI label of a record type.
  • Both getRecordTypeInfosByDeveloperName() and getRecordTypeInfosByName() are methods of the DescribeSObjectResult class.
  • The former is used to return a map that matches developer names to their associated record type.
  • The latter is used to return a map that matches record labels to their associated record type.
79
Q

There is a requirement to validate that the country code of an account field is a valid ISO code. There are over 200 codes. What could be used for this validation?
Choose 1 answer.

A. Validation Rule
B. Before Update trigger
C. After Update trigger
D. Workflow Rule

A

A. Validation Rule

  • A validation rule can be used to ensure that the code entered is valid.
  • In this particular scenario, the validation rule’s formula field can contain a list of ISO codes with which to verify the country code.
  • There is no need for programmatic customization in this case as a declarative tool can meet the requirement.
  • Workflow rules cannot be used to perform data validation.
80
Q

A developer is required to know the number of SOQL queries initiated in a single transaction Apex trigger along with its limit usage. What debug level should the Apex Profiling category on developer’s trace flag contain to satisfy this requirement?
Choose 1 answer.

A. FINER
B. ERROR
C. DEBUG
D. FINEST

A

D. FINEST

  • SOQL queries and its limit usage is included on the LIMIT_USAGE_FOR_NS debug event and is under Apex Profiling debug category – To access this event, the debug level should be in FINEST.
81
Q

A developer needs to update 10,005 Account records in an organization. What method can the developer use to avoid governor limits?
Choose 1 answer.

A. Write the code in an anonymous block
B. Write code to include a limit clause to restrict the number of records selected for processing
C. Use Batch APEX
D. Create a method with the @future annotation

A

C. Use Batch APEX

  • Batch APEX can be used to process large numbers of records.
  • Batch Apex operates over small batches of records, covering your entire record set and breaking the processing down to manageable chunks.
82
Q
A developer has created two custom objects with API names 'Sales Order\_\_c' and 'Shipment\_\_c' to track orders and shipments related to them. Sales Order is the parent in the master-detail relationship between the two objects. The Shipment object has a custom field named 'Tracking_Number\_\_c' that indicates the tracking number associated with a particular shipment. The developer is writing an Apex class in which he needs to retrieve all the sales orders and the tracking numbers associated with their shipment records using a SOQL query. Which of the following represents the correct syntax of the query?
Choose 1 answer.

A. SELECT Name, (SELECT Tracking_Number__c FROM Shipments__r) FROM Sales_Order__c
B. SELECT Sales_Order__c.Name, Shipment__c.Tracking_Number__c FROM Sales_Order__c, Shipment__c
C. SELECT Name, (SELECT Tracking_Number__c FROM Shipment__c) FROM Sales_Order__c
D. SELECT Name, (SELECT Tracking_Number__c FROM Sales_Order__c.Shipment__c) FROM Sales_Order__c

A

A. SELECT Name, (SELECT Tracking_Number__c FROM Shipments__r) FROM Sales_Order__c

  • Parent-child relationships can be traversed in the SELECT clause of a SOQL query by using a nested query. In this case, Shipments__r is the name of the relationship that the parent object named ‘Sales_Order__c’ has with the child object named ‘Shipment__c’.
83
Q

What is true in the debug log line below?
20:43:52.588 (7632137015) | LIMIT_USAGE | [137] | SOQL | 38 | 100

Choose 2 answers.

A. It denotes that 137 SOQL queries was executed out of limit usage of 100.
B. LIMIT_USAGE is the name of the event that occurred.
C. The debug log line above was triggered when the code reached the 38th line.
D. 20:43:52.588 (7632137015) corresponds to the timestamp of the log line.

A

B. LIMIT_USAGE is the name of the event that occurred.
D. 20:43:52.588 (7632137015) corresponds to the timestamp of the log line.

  • The debug log line was triggered when the code reached the 137th line. It denotes that 38 SOQL queries were executed out of limit usage of 100.
84
Q

A developer needs to access a list of data on a Visualforce page and represent the data as a table. However, the developer would also like to customize the look and feel and not use the standard Salesforce styling. What Visualforce components can the developer use?
Choose 3 answers.

A. apex:table
B. apex:dataTable
C. apex:listTable
D. apex:dataList
E. apex:repeat
A

B.apex:dataTable
D. apex:dataList
E. apex:repeat

apex:dataTable, apex:dataList, and apex:repeat can be used to create tables with custom styles.

85
Q

Which of the following are true about cross-object formula fields?
Choose 3 answers.

A. Cross-object formula fields can pull field values from objects that are up to 10 relationships away.
B. Cross-object formula fields can pull field values from its child records.
C. Cross-object formula fields can pull data from a record even if the user does not have access to it.
D. For every object, cross-object formula fields can be used in 3 roll-up summaries.
E. Cross-object formula fields can pull field values from master-detail or lookup parent records.

A

A. Cross-object formula fields can pull field values from objects that are up to 10 relationships away.
C. Cross-object formula fields can pull data from a record even if the user does not have access to it.
E. Cross-object formula fields can pull field values from master-detail or lookup parent records.

  • Cross-object Formula Fields can reference field values from related Parent records.
  • Even though a user does not have access to a record, data from this record can still be visible to the user through cross-object formula fields.
  • Formula Fields can reference field values from related Parent objects that are up to 10 relationships away.
86
Q

A developer notices that the code below returns only 20 Account records though she expected 60. Which of the following is true regarding SOSL query limits?

FIND {test} RETURNING Account(id), Contact, Opportunity LIMIT 60
Choose 1 answer.

A. Results were evenly distributed among the objects returned.
B. Limits have to be individually assigned per object.
C. Limits cannot be set in SOSL queries
D. The SOSL Syntax is incorrect.

A

A. Results were evenly distributed among the objects returned.

  • If a limit is set on the entire query, results are evenly distributed among the objects returned.
  • Limits can also be set per individual object.
87
Q

A component bundle contains a component or an app and all its related resources. Which of the following resources are part of the standard component bundle?
Choose 4 answers.

A. Documentation
B. Helper
C. Renderer
D. CSS Styles
E. Image and Animations
A

A. Documentation
B. Helper
C. Renderer
D. CSS Styles

  • The following resources are in a component bundle: Component or Application, CSS Styles, Controller, Design, Documentation, Renderer, Helper & SVG File.
88
Q

What attribute should the developer use to render a Visualforce page as a PDF file?
Choose 1 answer.

A. contentType=”application/vnd.pdf”
B. renderAs=”pdf”
C. docType=”pdf-1.0-strict”
D. docType=”pdf-5.0”

A

B. renderAs=”pdf”

89
Q

Which iteration components can be used to display a table of data in a Visualforce page?
Choose 2 answers.

A. apex:pageBlockTable
B. apex:table
C. apex:dataTable
D. apex:outputTable

A

A. apex:pageBlockTable
C. apex:dataTable

  • Iteration components work on a collection of items instead of a single value
  • ‘apex:pageBlocktable’ is a type of iteration component that can be used to generate a table of data, complete with platform styling.
  • The ‘apex:dataTable’ component can be used if custom styling is required.
90
Q

Which of the following statements about defining an Apex Class are true?
Choose 3 answers.

A. A definition modifier is required in the top-level class.
B. The keyword [class] followed by the name of the class is necessary
C. An access modifier is required in the declaration of a top-level class
D. The keyword [class] is required if no access modifier is present.
E. A developer may add optional extensions and/or implementations.
A
B. The keyword [class] followed by the name of the class is necessary
C. An access modifier is required in the declaration of a top-level class
E. A developer may add optional extensions and/or implementations.
  • To define a class, an access modifier (such as public or global) must be used in the declaration of a top-level class.
  • An access modifier is not required in the declaration of an inner class.
  • Definition modifiers (such as virtual, abstract) are optional. Whether an access modifier has been specified or not, the keyword [class] is always mandatory.
91
Q

A developer is considering using a standard controller on a Visualforce page. Which of the following are valid considerations about standard controllers?
Choose 3 answers.

A. To associate a standard controller with a Visualforce page, use the ‘controller’ attribute on the tag and assign it the name of any Salesforce object that can be queried using the Force.com API.
B. A Standard controller can retrieve a list of items to be displayed, make a callout to an external web service, validate and insert data
C. Every standard controller includes a getter method that returns the record specified by the id query string parameter in the page URL.
D. The standard controller provides a set of standard actions, such as create, edit, save, and delete, that you can add to your pages using standard user interface elements such as buttons and links.
E. To associate a standard controller with a Visualforce page, use the standardController attribute on the tag and assign it the name of any Salesforce object that can be queried using the Force.com API.

A

C. Every standard controller includes a getter method that returns the record specified by the id query string parameter in the page URL.
D. The standard controller provides a set of standard actions, such as create, edit, save, and delete, that you can add to your pages using standard user interface elements such as buttons and links.
E. To associate a standard controller with a Visualforce page, use the standardController attribute on the tag and assign it the name of any Salesforce object that can be queried using the Force.com API.

  • Standard controllers are not capable of making a callout to an external web service.
  • Also, the ‘standardController’ attribute is used for associating the standard controller, not the ‘controller’ attribute as it is used for custom controllers.
92
Q

A developer could use a formula field for which of the following requirements?
Choose 2 answers.

A. The formula field needs to have a default value, such as the week from the current date.
B. Display a traffic light image of red, yellow or green based on case priority.
C. Calculate a value based on other values and merge fields in Web-to-Lead forms.
D. Create a link to an application outside of Salesforce, passing parameters including the session Id.

A

B. Display a traffic light image of red, yellow or green based on case priority.
D. Create a link to an application outside of Salesforce, passing parameters including the session Id.

  • In order to add a default value, such as the week from the current date, a formula function can be used in a custom field, and not a formula field.
  • Custom formula fields are not available in Connect Offline, Web-to-Lead forms, or Web-to-Case forms.
93
Q

Apex and Visualforce pages are prone to data access control issues. Which approach helps address these issues?
Choose 1 answer.

A. Use the [with sharing] keyword in Apex classes
B. Use the [without sharing] keyword in Apex classes
C. Use the [shareable] keyword in Apex classes
D. Use the [non shareable] keyword in Apex classes

A

A. Use the [with sharing] keyword in Apex classes

  • When using an Apex class, the built-in user permissions and field-level security restrictions are not respected during execution.
  • The solution is to use the qualifying keywords with sharing when declaring the class.
  • The [with sharing] keyword directs the platform to use the security sharing permissions of the user currently logged in, rather than granting full access to all records.
94
Q
A developer has a class with private methods and needs to access the private methods from a test class. How can this be accomplished?
Choose 1 answer.

A. Change the access modifier of the class that private method is contained into public
B. Change the access modifier of the private method to public
C. Annotate the private method with TestVisible
D. Annotate the class that the private method is contained in with TestVisible

A

C. Annotate the private method with TestVisible

  • Use the @TestVisible annotation to allow test methods to access private or protected members of another class outside the test class.
  • These members include methods, member variables, and inner classes.
95
Q

Which of the following types of trace flags can be used by a developer?
Choose 3 answers.

A. User based
B. Class based
C. Trigger based
D. Lightning based

A

A. User based
B. Class based
C. Trigger based

  • Lightning-based trace flags are not available in the debug log.
  • Debug logs can be setup for specific users, classes and triggers.
96
Q

What is true regarding Person Accounts?
Choose 3 answers.

A. Person Accounts do not have an account hierarchy
B. If Person Accounts are enabled, when creating an account, the type of account to create needs to be selected
C. Once Person Accounts are enabled they cannot be disabled
D. Person Accounts have the same fields as a business account

A

A. Person Accounts do not have an account hierarchy
B. If Person Accounts are enabled, when creating an account, the type of account to create needs to be selected
C. Once Person Accounts are enabled they cannot be disabled

  • Person Accounts once enabled cannot be disabled.
  • When creating a new account, the type of account must be selected.
  • The fields of a person account are made up of fields from the Account and Contact objects.
97
Q

There are several escape sequences that can be used in queries so that a user query can contain special characters. Which of the following are valid escape sequences?
Choose 3 answers.

A. \c
B. \a
C. \n
D. \"
E. \'
A

C. \n
D. "
E. '

98
Q

What feature can be used to find the latest news and information about the account and contacts you are interested in?
Choose 1 answer.

A. Twitter Search
B. Social Accounts, Contacts and Leads
C. News Search
D. Global Search

A

B. Social Accounts, Contacts and Leads

  • The Social Accounts, Contacts, and Leads feature adds social network information from Twitter and YouTube to records.
99
Q

Because Apex runs in a multitenant environment, the Apex runtime engine enforces limits to ensure that Apex code or processes don’t monopolize shared resources. What are valid examples of these limits?
Choose 3 answers.

A. Maximum number of records that can be stored
B. Time executing a SOQL query
C. CPU time per transaction
D. Maximum execution time for a DML operation
E. Total number of records retrieved by SOQL queries

A

B. Time executing a SOQL query
C. CPU time per transaction
E. Total number of records retrieved by SOQL queries

  • The runtime engine enforces limits of how long a SOQL query can run, how many records can be returned in a query and the maximum amount of CPU time a transaction can take.
  • The maximum number of records that can be stored in an object is dependent on the storage available and is not subject to a governor limit.
  • Unlike SOQL queries, there is no maximum execution time for DML statements.
  • There is, however, a limit for the total number of DML statements that can be executed in an Apex transaction.
100
Q

Which are true regarding the runAs() method?
Choose 2 answers.

A. runAs() enforces user permissions and field level permissions
B. runAs() ignores user license limits
C. runAs() can be used with existing users or a new user
D. runAs() can be used in any APEX method

A

B. runAs() ignores user license limits
C. runAs() can be used with existing users or a new user

  • The system method runAs() enables test methods to be written that change the user context to an existing user or a new user so that the user’s record sharing is enforced.
  • The runAs() method does not enforce user permissions or field-level permissions, only record sharing.
  • It can only be used in test methods.
  • The runAs() method ignores user license limits. New users can be created with runAs() even if the organization has no additional user licenses.
101
Q

As per the order of execution, when will an email created from a workflow email alert be sent?
Choose 1 answer.

A. When all before triggers are executed.
B. Before entitlement rules execution.
C. After workflow rule execution.
D. After all DML operations are committed to the database.

A

D. After all DML operations are committed to the database.

  • Execution of post-commit logic, such as sending emails will happen after all DML operations are committed to the database.
102
Q

What is true about Custom Exceptions?
Choose 3 answers.

A. They are primarily useful if the method is called by another method and the exception handling is transferred to the other method.
B. They are capable of specifying detailed error messages and have additional custom error handling in catch blocks.
C. Built-in and custom Apex exceptions behave the same in throwing and catching exceptions.
D. They are not capable of re-throwing a caught exception.
E. They are built by extending the built-in Exception class and should end with the word Exception.
A
A. They are primarily useful if the method is called by another method and the exception handling is transferred to the other method.
B. They are capable of specifying detailed error messages and have additional custom error handling in catch blocks.
E. They are built by extending the built-in Exception class and should end with the word Exception.
  • Custom exceptions allow developers to throw and catch custom exceptions in methods.
  • A developer can also rethrow the caught exception as an inner exception in a custom exception.
  • This is primarily useful if the method is called by another method and transfers the exception handling to the other method. It is also capable of re-throwing a caught exception.
103
Q

What is true about how Salesforce deals with cross-site scripting (XSS) attacks?
Choose 2 answers.

A. Salesforce has implemented filters that screen out harmful characters in most output methods as one of the anti-XSS defenses.
B. Custom JavaScript is protected from XSS.
C. Escape should be enabled for Visualforce Tags e.g.
D. All standard Visualforce components, which start with , have anti-XSS filters in place.

A

A. Salesforce has implemented filters that screen out harmful characters in most output methods as one of the anti-XSS defenses.
D. All standard Visualforce components, which start with , have anti-XSS filters in place.

  • Salesforce has implemented filters that screen out harmful characters in most output methods.
  • All standard Visualforce components, which start with , have anti-XSS filters in place.
  • By default, nearly all Visualforce tags escape the XSS-vulnerable characters.
  • For custom JavaScript, the Force.com platform is not able to offer protection as it is intended to allow the developer to customize the page with script commands.
104
Q

What are valid use cases for using a custom controller in a Visualforce page?
Choose 2 answers.

A. A Visualforce page needs to add new actions to a standard controller.
B. A Visualforce page should replace the functionality of the standard controller.
C. A Visualforce page should override the save action of the standard controller.
D. A Visualforce page needs to run in system mode.

A

B. A Visualforce page should replace the functionality of the standard controller.
D. A Visualforce page needs to run in system mode.

  • A custom controller is not required to override the save action, a controller extension can be used to override one or more actions such as edit, view, save or delete.
105
Q

What is true regarding cascading execution of triggers?
Choose 1 answer.

A. Cascading execution of triggers will cause an exception
B. Cascading triggers are part of the same execution context with respect to governor limits
C. Each trigger will start a new execution context
D. There is a limit of 5 triggers that can be executed from a cascading execution

A

B. Cascading triggers are part of the same execution context with respect to governor limits

  • If the execution of one trigger causes one or more additional triggers to be fired, the triggers are said to be cascading triggers.
  • Salesforce enforces limits on operations such as the number of DML statements and SOQL queries that can issued to prevent recursion, but does not set a limit on the number of triggers that can be executed.
106
Q

You are trying to decide whether to use a master-detail or lookup relationship between two objects. Which of the following considerations are true?
Choose 3 answers.

A. Custom objects on the detail side of a master-detail relationship cannot have queues
B. Child records in master-detail relationships on custom objects cannot be reparented
C. In a master-detail relationship, the master record will be deleted when the only child is deleted
D. In a master-detail relationship, if the master record is deleted, the detail records will all be deleted
E. A custom object cannot be on the master side of a relationship with a standard object

A

A. Custom objects on the detail side of a master-detail relationship cannot have queues
D. In a master-detail relationship, if the master record is deleted, the detail records will all be deleted
E. A custom object cannot be on the master side of a relationship with a standard object

  • Child records in master-detail relationships on custom objects can be reparented to different parent records by selecting the [Allow Reparenting] option in the master-detail relationship definition.
107
Q

A PageReference is a reference to an instantiation of a page. Which of the following are valid means of instantiating a PageReference?
Choose 2 answers.

A. PageReference pageRef = new PageReference(‘URL’);
B. ApexPages.Page().existingPageName
C. Page.existingPageName
D. PageReference.page(‘URL’)

A
A. PageReference pageRef = new PageReference('URL');
C. Page.existingPageName
  • Use Page.existingPageName to refer to a PageReference for a Visualforce page that has already been saved in your organization.
108
Q

What does Trigger.new contain?
Choose 1 answer.

A. A list of new records and is available only in insert triggers
B. A list of new versions of records and is available in insert, update and undelete triggers
C. A map of sObject ids and records that are new or modified and available in insert and update triggers
D. A set of new versions of records available in insert and update triggers

A

B. A list of new versions of records and is available in insert, update and undelete triggers

109
Q

New Horizon Satellites uses Salesforce for opportunity management for its data service products. There are many variables and complex combinations that can be configured when offering a data service. The company currently uses Excel to produce quotes but would like to use Salesforce instead. What would be the recommended solution?
Choose 2 answers.

A. Use Salesforce Quote-to-Cash functionality
B. Create a custom button that allows exporting the opportunity details to Excel
C. Create a Visualforce page that displays the quote and allows saving it as a PDF
D. Look for an AppExchange product that meets the requirements
E. Use the standard Quote template functionality

A

A. Use Salesforce Quote-to-Cash functionality

D. Look for an AppExchange product that meets the requirements

110
Q

When writing an Apex Trigger, what should a developer keep in mind?
Choose 2 answers.

A. An Apex Trigger should not cause another trigger to be fired
B. An Apex Trigger should be logic-less and delegate the logic responsibilities to a handler class.
C. An Apex Trigger should use @future annotation in performing DML operations.
D. A single Apex Trigger is all you need for each object.a

A

B. An Apex Trigger should be logic-less and delegate the logic responsibilities to a handler class.
D. A single Apex Trigger is all you need for each object.

  • A single Apex Trigger is all that is needed for one particular object.
  • If multiple Triggers are developed for a single object, there is no way of controlling the order of execution if those Triggers can run in the same contexts.
  • Another widely-recognized best practice is to make Triggers logic-less. That means, the role of the Trigger is just to delegate the logic responsibilities to some other handler class.
  • An Apex Trigger may invoke another trigger, and there are methods to prevent unnecessary recursion.
  • An Apex Trigger may or may not use a future method to perform DML statements.
  • Note that future methods are asynchronous, and they do not necessarily execute in the same order they are called.
111
Q

What trigger context variable will return a map of IDs to the old versions of the sObject records?
Choose 1 answer.

A. updateMap
B. newMap
C. insertMap
D. oldMap

A

D. oldMap

  • Trigger.oldMap has the ID as the key and the old versions of the sObject record as value. This map is only available in update and delete triggers.
112
Q
You need to deploy an Apex class and test class to a production org but only have limited time. You decide to run selected tests. Which of the following are true about running selected tests?
Choose 2 answers.

A. Individual test methods can also be specified.
B. Code coverage is computed for each class and trigger individually and is different than the overall coverage percentage.
C. Running selected or specified tests is only available in Metadata API.
D. If the code coverage of an Apex component in the deployment is less than 75%, the deployment fails.

A
B. Code coverage is computed for each class and trigger individually and is different than the overall coverage percentage.
D. If the code coverage of an Apex component in the deployment is less than 75%, the deployment fails.
  • To shorten deployment time to production, a subset of tests can be run when deploying Apex components.
  • When running a subset of tests, code coverage is computed for each class and trigger individually and is different than the overall coverage percentage.
  • If the deployment package contains Apex classes and triggers, the executed tests must cover each class and trigger for a minimum of 75% code coverage.
  • Running a subset of tests can also be run in the Metadata API and is exposed in tools that are based on Metadata API, such as the Force.com Migration Tool.
  • Only test classes can be specified, not individual test methods.
113
Q

What is true regarding accessing sharing programmatically?
Choose 3 answers.

A. Objects on the detail side of a master-detail relationship do not have a sharing object
B. CustomObject__Share is the sharing object for a custom object
C. AccountShare is the sharing object for the Account object
D. Account__Share is the sharing object for the Account object

A

A. Objects on the detail side of a master-detail relationship do not have a sharing object
B. CustomObject__Share is the sharing object for a custom object
C. AccountShare is the sharing object for the Account object
D. Account__Share is the sharing object for the Account object
Incorrect
To access sharing programmatically, use the share object associated with the standard or custom object you are working with. The naming convention for standard objects simply adds Share to the Object name: AccountShare, CaseShare, ContactShare, etc. Custom objects require appending __Share to the custom object name (but without a “c”). For example, the sharing object for MyCustomObject would be called MyCustomObject__Share.

Objects on the detail side of a master-detail relationship do not have an associated sharing object, access to the detail records are determined by the master object sharing object and the sharing setting of the relationship.

114
Q

What features are included in the testing framework?
Choose 2 answers.

A. Provide automation for testing through the user interface
B. Create test methods automatically
C. Run unit tests
D. Check test results and code coverage

A

C. Run unit tests
D. Check test results and code coverage

  • The testing framework provides a framework to create unit tests, run unit tests, run only the code that is marked as tests, check the test results and code coverage to ensure that the code can be deployed to production.
115
Q

A developer implemented two workflow field updates. Field update on Rule A triggers Rule B and the other way around. What will happen?
Choose 1 answer.

A. This will not happen as field updates implicitly prohibit recursion.
B. It will cause a loop and the organization will exceed its limit for workflow time triggers per hour.
C. The workflow reevaluation will automatically be suspended.
D. A field update exception will occur and will be displayed for the current user.

A

B. It will cause a loop and the organization will exceed its limit for workflow time triggers per hour.

116
Q

How can test data be supplied to test methods?
Choose 3 answers.

A. Data can be created programmatically using APEX
B. Data can be loaded from csv files using Data Loader
C. Existing data can be accessed using SOQL queries
D. The data import wizard can be used in test mode
E. Data can be loaded from static resources

A

A. Data can be created programmatically using APEX
C. Existing data can be accessed using SOQL queries
E. Data can be loaded from static resources

  • Salesforce does not recommend the use of Data Loader to create test data.
  • The recommended method is creating a static resource from a .csv file that contains the test data and calling Test.loadData in the test method.
  • Existing data can be accessed via SOQL queries but it is not recommended as the data will be org dependent.
  • It is recommended to store data in static resources or create data programmatically.