Professional Documents
Culture Documents
Display Past Results
Categories
A developer created a custom object named Project. Data from associated projects needs to
be summarized on each Account. All associated projects should be deleted when an Account
is deleted. How can the developer achieve this?
Incorrect
Implementing a master-detail relationship between objects automatically deletes the child whenever the parent is deleted.
http://focusonforce.com/displaypastresults/ 1/28
3/9/2017 Display Past Results
Sam has completed a solution design and is ready to create the data model for a new
application in Salesforce. There are a number of custom objects, each with a number of
custom elds and relationships between the custom objects. What would you suggest to
complete the task most ef ciently? Choose 1 answer.
A. Use the Schema Builder to create custom objects and elds and the Create->Objects in Setup to create relationships
B. Use the Schema Builder to create custom objects, elds and relationships
C. Use the Schema Builder to create objects, elds and relationships need to be created using the Create Custom Field in Setup
D. Create the Custom objects, elds and relationships using the Create->Objects in Setup and use the Schema Builder to verify the data model was
created correctly.
Incorrect
Schema Builder can be used to ef ciently create a number of objects, elds and relationships with less time than using the Create->Objects option in Setup.
The Salesforce Administrator is building an application and needs to create a master detail
relationship between the standard object Account and a custom object. What is true
regarding the relationship? Choose 2 answers.
A. The custom object can be on the master or detail side of the relationship
B. The standard object can be on the master or detail side of the relationship
D. The object on the detail side will inherit the security and sharing settings of the master object
Incorrect
In master detail relationships between standard and custom objects, the standard object is always the master. The detail records will inherit the security and
sharing settings of the master.
http://focusonforce.com/displaypastresults/ 2/28
3/9/2017 Display Past Results
You have a requirement to associate a project manager to a project record. Project managers
are de ned as users in the application. What type of relationship would be most appropriate?
A. Lookup Relationship
Incorrect
A lookup relationship eld can be de ned on the project record that can lookup the standard User object.
What is true regarding record access in a master detail relationship? Choose 2 answers.
C. The detail object inherits the sharing and security settings of the master record
D. The owner of a detail object is automatically set to the owner of its associated master record
Incorrect
The Owner eld on the detail object is not available and is automatically set to the owner of its associated master record. Custom objects on the detail side of a
master-detail relationship cannot have sharing rules, manual sharing, or queues, as these require the Owner eld.
The detail record inherits the sharing and security settings of its master record.
A developer can view and download Debug Logs using which of the following? Choose 2
answers.
A. Developer Console
B. Instrumentation Console
Incorrect
A developer may view, download and delete Debug Logs in the Developer Console and using Setup -> Debug Log in the Salesforce UI. The Instrumentation console
is available in Lightning Experience and its sole purpose is to log only the interactions on the page that includes time since loaded, session start time, previous page
URL, sequence. The service cloud console is designed to boost productivity in service environments.
http://focusonforce.com/displaypastresults/ 3/28
3/9/2017 Display Past Results
Objective: Debug and Deployment Tools
Detailed Objective: Describe how to monitor and access the various types of debug logs
The Checkpoints tab in the Developer Console displays a list of saved checkpoints and
displays a snapshot of the state of objects in memory at the time the checkpoint was reached.
What information about the checkpoint will it include? Choose 2 answers.
A. Class
B. Line
C. View state
D. Debug Statement
Incorrect
The Checkpoints tab in the Developer Console provides the following information: Namespace, Class, Line and Time.
A developer would like to accelerate their development and deployment working with the
Force.com platform and has installed Eclipse and added the Force.com IDE plugin. What are
the bene ts of using the Force.com IDE? Choose 2 answers.
Incorrect
The Force.com IDE is a powerful client application for creating, modifying and deploying Force.com applications. It can retrieve up to 10,000 les at once and the
maximum size of the deployed or retrieved .zip le is 39 MB.
http://focusonforce.com/displaypastresults/ 4/28
3/9/2017 Display Past Results
What are the recommended tools for deploying metadata from one org to another? Choose 2
answers.
A. Unmanaged Packages
B. Data Loader
C. Metadata API
D. Change Sets
Incorrect
Change Sets and the Force.com Migration Tool are the recommended tools for migration. Change Sets is accessible through the Salesforce user interface and
allows migrations between sandboxes and to production. The Force.com Migration Tool is a command-line tool and migrates data between two environments,
including Developer Editions orgs.
As a customer developing a new force.com application that will include APEX code, what
considerations are valid? Choose 2 answers.
Incorrect
Although con guration can be completed directly in the production environment, it is not recommended, as changes should be tested in a separate environment
rst. APEX coding can only be created in development environments. Best practice is to have at least 3 environments, one for development, one for testing and a
production environment.
http://focusonforce.com/displaypastresults/ 5/28
3/9/2017 Display Past Results
How can a dynamic SOQL query be constructed at runtime using input from an end user?
Incorrect
Universal Containers would like to see a Red / Yellow / Green Traf c Light representation on
the Opportunity detail page, based on the value in the Opportunity Probability eld. What
would you use to achieve this?
A. Formula Field
D. Image Field
Incorrect
An image (stored in documents) can be displayed conditionally using a formula eld using the IMAGE() function.
How can child records be updated when the parent is modi ed? Choose 2 answers.
C. Using a Trigger
Incorrect
Process Builder can be used to update related records including child records.
http://focusonforce.com/displaypastresults/ 6/28
3/9/2017 Display Past Results
A developer is considering writing a trigger to perform data validation to ensure that only
valid data is saved. What other options can be used for data quality checks? Choose 3
answers.
A. Validation rules
B. Required elds
C. Picklists
D. Escalation rules
Incorrect
Validation rules, required elds and picklists can all ensure data quality. Other options include lookup elds with lters and setting elds required on a page layout.
A. 3 + 4
B. new List<Opportunity>()
C. myClass.myMethod()
D. @future
Incorrect
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.
Given the following value from a Lead record, lastModi edDate:2016-05-06 03:25:41, what
data type should the developer use to retrieve this type of information?
A. Time
B. DateTime
C. Date
D. DateValue
Correct
Time is a value that indicates a particular time. While Date is a value that indicates a particular day. The answer is DateTime, as the lastModi edDate indicates a
particular day and time, an example of a timestamp.
http://focusonforce.com/displaypastresults/ 7/28
3/9/2017 Display Past Results
What is the output of the code below? Integer z = 5; do { z = z + 1; } while(z <= 15);
System.debug(z);
A. 13
B. 14
C. 15
D. 16
Incorrect
The loop will iterate until such time the condition of the while block is evaluated as false. Prior to this, the variable z is equal to 16.
Which correctly describes the code snippet below? Choose 2 answers. public with sharing
class containerClass { //Insert code here public class innerClass { //Insert code here } }
A. The innerClass does not inherit the sharing setting of the containerClass.
Incorrect
“without sharing” is the default sharing setting for Apex classes. Inner classes do not inherit the sharing setting from their container class.
Which of the following statements are true when de ning Apex classes? Choose 2 answers.
http://focusonforce.com/displaypastresults/ 8/28
3/9/2017 Display Past Results
Incorrect
It is mandatory to specify one of the access modi ers when declaring a top-level class, while it is not mandatory to specify an access modi er when declaring inner
classes. You must use one of the access modi ers (such as public or global) in the declaration of a top-level class. The private access modi er declares that the class
is only known locally. The default access for inner classes is private. If the access modi er is not speci ed for an inner class, it is considered private. Inner classes
can only be one level deep.
A. Apex Triggers
C. Apex Classes
Incorrect
All Apex code runs in system mode, where the permissions and record sharing of the current user are not taken into account. The exception to this is anonymous
blocks that run as the current user.
What should a developer consider when using the upsert operation to insert and update
records? Choose 3 answers.
A. Using the upsert operation, the administrator can either insert or update an existing record in one call.
B. To determine whether a record already exists, the upsert statement or Database method uses the ID of the record as the key to match records, a
custom external ID eld, or a standard eld with the idLookup attribute set to true.
C. If the key is not matched, a new object record is created. If the key is matched once, the existing object record is updated.
D. If the key is matched multiple times, the existing object record is updated based on the latest match.
Incorrect
If the key is matched multiple times, then an error is generated and the object record is neither inserted or updated.
http://focusonforce.com/displaypastresults/ 9/28
3/9/2017 Display Past Results
Which of the following DML statements will allow other records in a list to be inserted even if
there are records that failed?
A. insert sObjectsToCreate;
B. upsert sObjectsToCreate;
C. Database.insert(sObjectsToCreate,true);
D. Database.insert(sObjectsToCreate,false);
Incorrect
The Database insert method has a Boolean parameter that when set to false and a record in the list fails, the remaining records in the list can still succeed.
A developer has written the following code to do a SOSL search: FIND {New York}. What will
be returned?
Correct
http://focusonforce.com/displaypastresults/ 10/28
3/9/2017 Display Past Results
SOSL statements evaluate to a list of lists of sObjects, where each list contains the search results for a particular sObject type
Which of following code snippets are examples of statements that should not be included
within a looping statement? Choose 2 answers.
A. insert accountList;
C. Opportunity getOpp = [SELECT Id, AccountId FROM Opportunity WHERE AccountId =: acc.Id];
Incorrect
A common mistake is that queries or DML statements are placed inside a for loop. There is a governor limit that enforces a maximum number of SOQL queries.
There is another that enforces a maximum number of DML statements (insert, update, delete, undelete). When these operations are placed inside a for loop,
database operations are invoked once per iteration of the loop making it very easy to reach these governor limits.
Which of the following is not a valid Apex data type? Choose 2 answers.
A. Blob
B. Currency
C. ID
D. Text
E. Enum
Incorrect
Currency and Text are not valid data types. Instead of currency and text, a developer may use Decimal and String data types respectively.
Given the following options, what data type should the developer use to store queried records
via SOQL?
A. List
B. Group
http://focusonforce.com/displaypastresults/ 11/28
3/9/2017 Display Past Results
C. Enum
D. Container
Incorrect
A list is an ordered collection of elements that are distinguished by their indices. List<sObject> should be used for storing queried records via SOQL. A map can also
be used.
A developer needs to write a trigger on the [Survey] custom object. This trigger will use the
email address on the [Survey] record and look for a matching email address on the existing
contact records. If a matching email address is found, then the [Survey] record [Name of
Contact] eld should be populated with the name of the contact found. What is the best
collection data type to use when storing contact records?
A. List
B. Set
C. Map
D. Group
Incorrect
A map is a collection of key-value pairs where each unique key maps to a single value. The developer can query the contact records and place it in a map with
Contact.Email as a key and Contact.Name as a value. Then, on Survey record iteration, the developer may use the get method to look for the corresponding
Contact.Name for a given email address.
A developer needs to get all IDs of related Accounts on all of the Contact records. What
collection data type should the developer use to avoid having duplicate IDs?
A. List
B. Set
C. Map
D. Group
Incorrect
A set is an unordered collection of elements that do not contain any duplicates. The developer can query all Contacts and put it in a List<Contact>. Then, the
Contact list can be iterated to get the AccountId and add it to a Set<Id>. If 2 or more contacts have the same AccountId, one entry will remain in the Set.
http://focusonforce.com/displaypastresults/ 12/28
3/9/2017 Display Past Results
String is one of the primitive data types in Salesforce. Given the following options, what is a
valid value that a string data type variable can contain?
A. ‘Salesforce’
B. TRUE
C. "Salesforce"
D. 3.14159
Incorrect
String is any set of characters surrounded by single quotes. Double quotes cannot be used in a String type as it will cause an error and it is not the standard
notation for String declaration in Apex.
A. Methods that are annotated with @future identify methods that are executed asynchronously
B. Methods that are annotated with @future identify methods that are executed synchronously
C. A method annotated with future can call another method that also has the future annotation
Incorrect
The future annotation is used to identify methods that are executed asynchronously. When you specify future, the method executes when Salesforce has available
resources.
http://focusonforce.com/displaypastresults/ 13/28
3/9/2017 Display Past Results
A developer implemented two work ow eld updates. Field update on Rule A triggers Rule B
and the other way around. What will happen?
B. It will cause a loop and the organization will exceed its limit for work ow time triggers per hour.
C. A eld update exception will occur and will be displayed for the current user.
Incorrect
Work ow rules can create recursive loops. For example, if a eld update for Rule1 triggers Rule2, and a eld update for Rule2 triggers Rule1, it will cause recursion
and may cause the organization to exceed its limit for work ow time triggers per hour.
A developer can have code to insert or update records that will allow successful ones, and will
record errors for those don’t – it’s called partial processing. However, this method will not
throw an exception. How should the developer handle the possible exceptions?
Incorrect
http://focusonforce.com/displaypastresults/ 14/28
3/9/2017 Display Past Results
To deal with individual exceptions, the developer can use the Database.SaveResult Class – looping through the save result looking for errors then pass the save
result to a method that will process the error records.
Error messages are not displaying when errors are caught in the following code. What is the
reason for this?: try{ //some logic here } catch (Exception e) { ApexPages.Message errMsg= new
ApexPages.Message(ApexPages.Severity.FATAL,e.getMessage());
ApexPages.addMessage(errMsg); }
B. The whole page is refreshing and at that point loses the message
D. The entity that causes the error is on the reRender attribute which will cause the error to not show.
Incorrect
The message component is not added to the page – <apex:pageMessages/>. This component displays all messages that are generated for all components on the
current page including error messages.
If a developer is required to create a page that will show and add actions on a set of records,
what controller should a developer use?
http://focusonforce.com/displaypastresults/ 15/28
3/9/2017 Display Past Results
A. Standard Controller
C. Custom Controller
Correct
Standard list controllers allow developers to create Visualforce pages that can display or act on a set of records. Standard List Controller can be represented just by
adding recordSetVar tag on <apex:page>. Alternatively, developers can also use Custom list Controller – It is similar as Standard list Controller but requires coding
in custom controller or in extension.
Incorrect
Mark up should be used: <apex:page standardController=”Opportunity” recordSetVar=”opportunities”>. The recordSetVar attribute not only indicates that the
page uses a list controller, it can indicates the variable name of the record collection. This variable can be used to access data in the record collection.
http://focusonforce.com/displaypastresults/ 16/28
3/9/2017 Display Past Results
Salesforce Reference Link
What are valid use cases for using a controller extension in a Visualforce page? Choose 3
answers.
Incorrect
A controller extension is an Apex class that extends the functionality of a standard or custom controller. Controller extensions can be used to override one or more
actions, such as edit, view, save, or delete or add new actions. Although custom controllers and controller extension classes execute in system mode and thereby
ignore user permissions and eld-level security, you can choose whether they respect a user’s organization-wide defaults, role hierarchy, and sharing rules by using
the with sharing keywords in the class de nition.
http://focusonforce.com/displaypastresults/ 17/28
3/9/2017 Display Past Results
Which of the following is not considered one of the security vulnerabilities in Apex and
Visualforce Development:
B. SOQL Injection
Incorrect
Cross-site scripting (XSS) attacks cover a broad range of attacks where malicious HTML or client-side scripting is provided to a Web application. The Web
application includes malicious scripting in a response to a user of the Web application.
SQL/SOQL injection involves taking user-supplied input and using those values in a dynamic SOQL query. If the input is not validated, it can include SOQL
commands that effectively modify the SOQL statement and trick the application into performing unintended commands.
In CSRF, the attacker’s page contains a URL that performs an action on your website. If the user is still logged into your Web page when they visit the attacker’s
Web page, the URL is retrieved and the actions performed.
A custom controller is an Apex class that implements all of the logic for a page without
leveraging a standard controller. A developer may need to use a custom controller in the
following except?
http://focusonforce.com/displaypastresults/ 18/28
3/9/2017 Display Past Results
Correct
You can add pagination to a page using a list controller by utilizing the ‘next’ and ‘previous’actions using a StandardListController.
A developer is required to create an Apex Trigger to populate the KeyPerson__c eld on the
Case object based on eld values in its related Account record. In which trigger should this be
created? Choose 2 answers.
A. before update
B. after insert
C. before insert
D. after update
Incorrect
You can use an object to change its own eld values using trigger.new, but only in before triggers. In all after triggers, trigger.new is not saved, so a runtime
exception is thrown.
D. Objects on the detail side of a master-detail relationship have do not have a sharing object
Incorrect
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm
If a developer needs to skip to the next iteration of a loop, what loop control structure should
be used?
A. break;
B. continue;
C. end;
http://focusonforce.com/displaypastresults/ 19/28
3/9/2017 Display Past Results
D. skip;
Incorrect
Using the word continue in a looping structure will skip the iteration and proceed to the next one.
A. Salesforce organizations can choose to accept upgrades, so different organizations maybe on different releases
Incorrect
Salesforce updates automatically 3 times a year and cannot be scheduled. No client software is required, apart from a browser to access the internet. Sandoxes are
upgraded prior to production environments so that the changes can be previewed and tested.
Incorrect
Custom objects are part of the model in MVC, and standard and visualforce pages are part of the View component.
If multiple people in your organization work with an account, how can this be tracked easily
and they be given access they need?
http://focusonforce.com/displaypastresults/ 20/28
3/9/2017 Display Past Results
Correct
A Salesforce Account Team can contain up to ve people, each of whom can be assigned different roles and different levels of access to the account and its
opportunities and cases.
Of the following all are true regarding how Salesforce supports the sales process except?
A. Salesforce features include leads, campaigns, products, pricebooks, opportunities and quotes
C. Opportunity Teams allow a group of people working on a deal to be associated with an opportunity
D. Only contacts from the account related to the opportunity can be linked using contact roles
Incorrect
Contact Roles for opportunities track which contacts are related to the opportunity, and the role they play. Contacts from other accounts can be linked to the
opportunity using contact roles.
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
Incorrect
Apps can either be managed or unmanaged packages, and overall limits are affected in different ways depending on the type of package.
A developer is required to ensure that a reason is entered if an opportunity is lost and closed.
What is the best way to meet this requirement?
A. Work ow rule
B. Validation rule
C. Trigger
D. Required eld
http://focusonforce.com/displaypastresults/ 21/28
3/9/2017 Display Past Results
Correct
A validation rule can be used to check the value of the status eld and if closed lost, ensure that a reason is entered. A trigger could also be used, but this
requirement can be met with con guration.
Incorrect
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.
Objective: Testing
Detailed Objective: Describe the testing framework and requirements for deployment.
D. Support for deleting test data when unit tests are complete
Incorrect
Unit tests do not commit changes to the database so test data does not need to be deleted upon completion.
Objective: Testing
Detailed Objective: Describe the testing framework and requirements for deployment.
Test methods don’t have access by default to pre-existing data in the organization except?
Choose 3 answers.
A. Record Types
B. Users
C. Custom Objects
D. Pro les
Incorrect
http://focusonforce.com/displaypastresults/ 22/28
3/9/2017 Display Past Results
Objects that are used to manage your organization or metadata objects can still be accessed in your tests such as: Users, Pro le, Organization, RecordType
Objective: Testing
Detailed Objective: Describe when and how to use various sources of test data
A developer would like to run all unit tests. How can this be started? Choose 2 answers.
Incorrect
All tests can be run from the Developer Console or using the [Run All Tests] button on the Apex Classes page.
Objective: Testing
Detailed Objective: Describe how to execute one or multiple test classes
http://focusonforce.com/displaypastresults/ 23/28
3/9/2017 Display Past Results
Incorrect
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.
Objective: Testing
Detailed Objective: Describe when and how to use various sources of test data
http://focusonforce.com/displaypastresults/ 24/28
3/9/2017 Display Past Results
A developer created a Visualforce page with a standard controller for the Contact object. The
developer can display elds from its related Account by?
A. Using a SOQL query on the controller and setting the queried record on the page.
Incorrect
As with queries in the Force.com API, you can use merge eld syntax to retrieve data from related records: You can traverse up to ve levels of child-to-parent
relationships. For example, if using the Contact standard controller, you can use {!contact.Account.Owner.FirstName} (a three-level child-to-parent relationship) to
return the name of the owner of the account record that is associated with the contact.
A developer has a requirement to provide round robin lead assignment functionality. The
assignment rules should be driven by settings available to a user in the user interface. What
could be used for this? Choose 2 answers.
C. Create a new unmanaged package that includes Apex and Visualforce pages
D. Create a new Visualforce page, Apex Controller and Apex code to provide the functionality
Incorrect
If an unmanaged package can be found that includes most of the functionality, it could be customized to suit the exact requirements, instead of starting from
scratch. A managed package cannot be modi ed. If development is started from scratch, a new Visualforce page, Apex controller and code would be required.
A. <apex:include>
B. <apex:iframe>
C. <apex:getsite>
D. <apex:output>
Incorrect
apex:iframe – A component that creates an inline frame within a Visualforce page. A frame allows you to keep some information visible while other information is
scrolled or replaced.
http://focusonforce.com/displaypastresults/ 25/28
3/9/2017 Display Past Results
Salesforce Reference Link
A developer would like to display a Visualforce page from a custom button on the Account
page layout. What is true regarding this? Choose 2 answers.
Incorrect
Custom links and buttons can be added to standard page layouts and work with standard or custom objects.
http://focusonforce.com/displaypastresults/ 26/28
3/9/2017 Display Past Results
What types of resources are included in a Lightning Component bundle? Choose 3 answers.
A. Javascript code
B. APEX code
C. CSS
D. SVG File
Incorrect
A component bundle contains a component or an app and all its related resources including javascript functions, css, svg le for a custom icon and documentation.
A. HTML
http://focusonforce.com/displaypastresults/ 27/28
3/9/2017 Display Past Results
B. CSS
C. Javascript
D. Other Components
Incorrect
A component can contain other components, as well as HTML, CSS, JavaScript, or any other Web-enabled code.
Copyright 2017 - www.focusonforce.com About Contact Us Disclaimer Privacy Policy Login View as Mobile
http://focusonforce.com/displaypastresults/ 28/28