Data Modeling
Data Modeling
# What’s new?
Display Past Results
$ FAQ’s
) Blog
Data Modeling and Management (5%) – PD2 11-May-2020 81.25 %
* Focus People
13 of 16 questions answered correctly
- Log Out
Your score
81.25%
Categories
VIEW INCORRECT
Questions
1. Andrea needs to import records from a different Salesforce org into her org using Data Loader. The CSV files she was given contain
Salesforce record IDs from the old system. She is able to import the parent records but gets an error message saying no parent record
was found any time she tries to import a child record. What is the most efficient way to get all the records loaded into her system?
Choose 1 answer.
Define a new field on the parent object and mark it as External ID, store the original Salesforce IDs in this field, then use this field as the
parent reference field when importing the child records
Disable the parent-child relationship in Salesforce, import the data, then re-enable to relationship
Import the parent records and then manually add each child record through the user interface
Import the parent records, run an export of the new records to get the Salesforce IDs, manually enter the new Salesforce ID into the spreadsheet
for the child records, then import the child records
Correct
Designating a text, auto-number or email field as an External ID lets you use the field as a reference point when importing related records.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Describe the use cases for and benefits of external IDs
2. Acme Containers uses a custom object named Models to track the different container sizes. Models contains a custom text field
called Keywords. Users want to be able to use the sidebar search to find a record based on text in the Keywords field. How can this be
done? Choose 1 answer.
Incorrect
Designating a text, auto-number or email field as an External ID makes the field sidebar-searchable. Note: sidebar search is only available if Chatter
is NOT enabled for the org.
Salesforce Reference Link
Salesforce Reference Link 2
Objective: Data Modeling and Management
Detailed Objective: Describe the use cases for and benefits of external IDs
3. A system administrator wants to create an External ID field to pull data from another system. Which of the following data types can
be marked External ID? Choose 3 answers.
Text
Long text
AutoNumber
URL
Correct
Any CUSTOM text, auto-number or email field can be designated as an External ID, subject to object limits. Fields of this type will have a checkbox
option for designating the field as External ID. Other field types will not have this checkbox on the field definition screen.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Describe the use cases for and benefits of external IDs
4. Sam recently joined a new company as a Salesforce Administrator and has to do data imports several times a week. Before doing the
import, Sam has to manually disable every validation rule, and then re-enable the rules after import. Sam would like to come up with a
way to easily disable all validation rules at once prior to importing, and easily enable these rules after import. Which of the following
solutions would make it easy to turn off all validation rules as needed? Choose 1 answer.
Create a custom data loader which programmatically turns off all validations rules before loading data
Create a Hierarchy Custom Setting that can be checked from within a validation rule, then modify the validation rules to reference this
setting
Use Data Loader and select the Ignore Validation Rules option
Correct
Hierarchy Custom Settings allow for the creation of an organization-wide default value that can be overridden for specific profiles or users. The
Custom Setting could have a checkbox field called Run Validation which would be enabled for all users except the System Administrator and other
select profiles/users. Data Loader does not have an Ignore Validation Rules option. A trigger in this scenario is not feasible as the existing validation
rules will still be executed.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Identify use cases for different types of custom metadata and custom settings, and describe how to implement solutions for
those use cases
5. A developer is creating a custom application and wants to quickly and easily reference configuration data specific to the application.
He also wants to be able to include the configuration data in a managed package. What is the best tool to use in this scenario? Choose
1 answer.
Static Resource
Custom Settings
Custom Metadata
Correct
Custom Metadata can be set up to store the app configuration data. Although Custom Settings can also provide this functionality, its data cannot be
included in a package. On the other hand, both metadata and data can be included in a package for Custom Metadata Types.
Static Resources are used for web assets such as CSS files and Javascript, or CSV files for loading test data, and cannot be used for storing
configuration. Utility Apex classes contain helper methods that are utilized either by test or not-test classes.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Identify use cases for different types of custom metadata and custom settings, and describe how to implement solutions for
those use cases
6. Although Custom Metadata Types are preferred in many instances over Custom Settings, in which of the following use cases would
a Custom Setting be the better option? Choose 1 answer.
Correct
Custom Settings support the use of currency fields, but Custom Metadata Types do not.
Hierarchy Custom Settings and Custom Metadata Types can be accessed in formula fields. Custom Metadata Types have the advantage of being
accessible from test classes and the ability to deploy data in packages.
Salesforce Reference Link
Salesforce Reference Link 2
Objective: Data Modeling and Management
Detailed Objective: Identify use cases for different types of custom metadata and custom settings, and describe how to implement solutions for
those use cases
7. Cosmic Repair Solutions has several formula fields based on specifications related to machines repaired by the company. The
formulas used in the fields perform calculations on parameters which often need to be changed. In order to make the updates easier,
which of the following should be created to store parameters for different types of machines that can be used in formula fields?
Choose 1 answer.
Custom Fields
Flow
Correct
A custom metadata type can be created to store parameters related to different types of machines. Custom metadata records can be created to
store information about different machines and their specifications. It is possible to reference a custom metadata type in a formula field.
Formula fields only work for hierarchy custom settings; they can’t be used for list custom settings. Since custom fields do not represent metadata,
they should not be used for this requirement. A flow cannot be used to store metadata parameters.
Salesforce Reference Link
Salesforce Reference Link 2
Objective: Data Modeling and Management
Detailed Objective: Identify use cases for different types of custom metadata and custom settings, and describe how to implement solutions for
those use cases
8. The data architect of Cosmic Enterprises has designed a data model in which a custom field called 'Discount' has been defined on
the Opportunity object and two custom objects called 'Sales Order' and 'Invoice'. The default value of this field should be based on
minimum spending that is defined on a monthly basis. Every record created with this field should use the default discount value upon
record creation. A developer has set up a custom metadata type record and used it as a default value for the field. Which of the
following statements are true about changing the default field value according to the business requirement? Choose 2 answers.
Instead of updating multiple field references, the default field value can be updated in the custom metadata type record.
The default field value would need to be updated on each record that uses it.
The default field value would need to be stored in a formula field if it needs to be changed regularly.
The default field value can be overridden by a user if the field is not read-only.
Correct
A custom metadata type record can be created to define a default value to minimize the effort in maintaining several fields that use a common
default value whenever the default value changes. As it is being referenced by multiple fields, changes to the custom metadata type record will
reflect on all the fields referencing it, minimizing the effort to change each field’s default value.
A default field value is the initial value of a field that is used when a record is created; it cannot change on any existing records. If a field is not read-
only, the default field value can be overridden by a user and changed to another value. It is not necessary to store the default value in a formula field
if it needs to be changed regularly.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Identify use cases for different types of custom metadata and custom settings, and describe how to implement solutions for
those use cases
9. The Salesforce developer of Cosmic Service Solutions is trying to determine whether Apex managed sharing would be suitable for a
specific use case. Which of the following are valid use cases of Apex managed sharing? Choose 2 answers.
A record of a custom object needs to be shared with a user specified on the record based on specific field values.
Account records need to be shared with a certain role when the value of the Industry field is set to 'Education'.
Records of a custom object need to be shared with a specific group of users multiple times due to different reasons.
Correct
A criteria-based sharing rule can be used to declaratively share records with a certain role based on certain field values. Apex Managed Sharing is not
required for it. When a record of a custom object needs to be shared with a specific user-specified on the record, Apex managed sharing must be
used. Apex managed sharing makes use of Apex sharing reasons, which allow tracking why a record is shared with a user or group of users. An
organization can be set up to allow manual sharing of records by clicking a button.
Salesforce Reference Link
Salesforce Reference Link 2
Objective: Data Modeling and Management
Detailed Objective: Given a scenario, identify and justify where Apex managed sharing should be used.
10. A business use case requires complex logic to be implemented for sharing records of a certain custom objects. Different users may
require access to the object under different circumstances. When implementing Apex managed sharing, which best practices should
be followed? Choose 2 answers.
Use one sharing reason per object to avoid conflicts between sharing reasons.
Consider all possible declarative sharing solutions before implementing Apex managed sharing.
Incorrect
Using multiple sharing reasons allows you to simplify sharing logic, but using multiple reasons could also result in users getting access for more than
one sharing reason. Salesforce provides a variety of sharing options which can be set declaratively. These include the ability to share based on
certain record criteria. For ease of maintenance, built-in declarative options should be considered before resorting to Apex managed sharing. Apex
managed sharing can be safely implemented from both triggers and controllers.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Given a scenario, identify and justify where Apex managed sharing should be used.
11. Which of the following methods can be used to set up Apex managed sharing directly? Choose 2 answers.
Trigger
Custom controller
Process Builder
Workflows
Support process
Correct
Apex managed sharing requires accessing Share Objects. These can’t be accessed from Process Builder or Workflows. A process could be used to
invoke an Apex method to do this, however Process Builder cannot access share objects directly.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Given a scenario, identify and justify where Apex managed sharing should be used.
12. A developer needs to create a custom recalculation class for an object's Apex managed sharing rules. What steps must be taken to
ensure the recalculation class is called during automatic recalculations? Choose 2 answers.
The class must be associated with the object in the object's Apex Sharing Recalculations section
Incorrect
Recalculation classes must implement the Database.Batchable interface and be associated with the custom object’s sharing settings.
There is no requirement for the naming of a recalculation class. There is no @isRecalculate annotation.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Given a scenario, identify and justify where Apex managed sharing should be used.
13. The organization-wide default sharing setting of a custom object has been set to 'Private'. Three Apex sharing reasons have been
defined for the object. When a user named John updates a record owned by him, an Apex trigger automatically grants access to
certain users. A sales representative named Susan is supposed to get access to the record. The Apex trigger will attempt to grant the
following access levels to her: 1) 'Read Only' access to the record based on Apex sharing reason 1 2) 'Read/Write' access to the record
based on Apex sharing reason 2 3) 'Full access' access to the record based on Apex sharing reason 3 Which of the following will be
the result regarding Susan's access level? Choose 1 answer.
She cannot access the record due to the 'Private' sharing setting.
Correct
Full access level cannot be granted to a user using Apex. And, when determining a user’s access to a record, the most permissive level of access is
used. In this case, the user would gain view and edit access to the record since that access level is more permissive than ‘Read Only’. Even if the
organization-wide default sharing setting of an object is ‘Private’, Apex managed sharing can be used to grant access to users.
Salesforce Reference Link
Salesforce Reference Link 2
Objective: Data Modeling and Management
Detailed Objective: Given a scenario, identify and justify where Apex managed sharing should be used.
14. A developer in an org wants to add Apex managed sharing for a custom object, but doesn't see an associated share object for it.
What condition would cause a share object to not exist? Choose 1 answer.
The administrator hasn't enabled the 'Custom Sharing' setting in the org
The org doesn't have the correct license level for using the sharing feature
Correct
When an object’s OWD sharing policy is Public Read/Write, no other sharing is necessary, so a share object is not created. There is no ‘Custom
Sharing’ setting in an org, although manual sharing can be controlled in Setup. If the developer is considering an Apex solution, then the license level
is also high enough to support share objects. Share object names can’t be modified.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Given a scenario, identify and justify where Apex managed sharing should be used.
15. What is true about the DML statement and the SupplierPartNumber__c field, which is configured as an External ID, below? Choose
3 answers.
try {
} catch (Exception e) {
System.debug(e.getMessage());
}
The DML statement skips the operation if the SupplierPartNumber__c value already exists.
Correct
The upsert DML statement either updates or inserts a record depending on whether the record exists or not based on the record’s ID. An external ID
field, or a standard field in which idLookup attribute is set to true, can be used instead to determine a record’s state by adding the field name at the
end of the DML statement. External IDs may be used to reference an ID from another system. Although an External ID field can be optionally unique,
it has to be unique for Upsert operation. Otherwise, the DML operation will fail.
In this case, if the SupplierPartNumber__c exists already, the record will be updated. Otherwise, it will be inserted. Custom text, number, or email
fields can be configured as External ID fields.
Salesforce Reference Link
Salesforce Reference Link 2
Objective: Data Modeling and Management
Detailed Objective: Describe the use cases for and benefits of external IDs
16. A developer of Cosmic Solutions is building a custom application for managing performance reviews of employees. The application
will be mainly used by HR users to initiate and manage performance reviews. It should allow an HR user to start a performance review
process for each sales representative every month. Each support representative requires a performance review process every quarter,
and other employees of the company require it once every six months. Only the CEO of the company does not require a performance
review. The sales and support representatives are assigned to two different custom profiles. For the custom application, which of the
following should be used to store information about the number of annual reviews required for each type of user? Choose 1 answer.
Schema Setting
Correct
A hierarchy custom setting should be used to store the information for this requirement since it uses a built-in hierarchical logic that allows
personalizing the settings for specific profiles and users. A hierarchy custom setting called ‘Performance Review Setting’ can be created. A custom
field called ‘Number of Annual Reviews’ can be created for it, and four different data sets can be added. The data sets can be assigned to different
types of users.
For example, a data set containing ’12’ as the value of the ‘Number of Annual Reviews’ can be created and assigned to the custom profile of sales
representatives. Similarly, a data set can be created for the CEO with ‘0’ as the value of the custom field. A data set that is created for a specific user
overrides the profile setting. A data set that is created for a specific profile overrides the organization setting.
There is no feature called ‘Schema Setting’ that can be utilized for this use case. It is better to create a hierarchy custom setting instead of a custom
metadata type or list setting since these two do not have built-in-hierarchical logic.
Salesforce Reference Link
Objective: Data Modeling and Management
Detailed Objective: Identify use cases for different types of custom metadata and custom settings, and describe how to implement solutions for
those use cases
« Previous 1 2 3 4 5 6 … 20 Next »
Display your score and detailed results for the past 3 months. All past scores are available. Due to performance and storage constraints, detailed
results older than 3 months are removed.
Copyright 2020 - www.focusonforce.com About Blog Contact Us Disclaimer Privacy Policy Terms of Use View as Mobile
Privacy - Terms