Dev450 Mock

Bruno Assolini
Quiz by Bruno Assolini, updated more than 1 year ago
Bruno Assolini
Created by Bruno Assolini over 3 years ago
249
4

Description

Salesforce Certification Salesforce Platform Developer Quiz on Dev450 Mock, created by Bruno Assolini on 04/27/2017.

Resource summary

Question 1

Question
When loading data into an organization what can a developer do to match records to update existing fields? (Choose 2)
Answer
  • Match an auto-generated Number field to a column in the imported file
  • Match an external Id Text field to a column in the imported file
  • Match the Name field to a column in the imported file
  • Match the Id field to a column in the imported file

Question 2

Question
Which trigger event allows a developer to update fields in the Trigger.new list without using an additional DML statement? (Choose 2)
Answer
  • After insert
  • After update
  • Before update
  • Before insert

Question 3

Question
What is a capability of a StandardSetController? (Choose 2)
Answer
  • It extends the functionality of a standard or custom controller
  • It allows pages to perform pagination with large record sets
  • It enforces field-level security when reading large record sets
  • It allows pages to perform mass updates of records

Question 4

Question
Where can custom roll-up summary fields be created using Standard Object relationships? (Choose 3)
Answer
  • On Opportunity using Opportunity Product records
  • On Quote using Order records
  • On Campaign using Campaign Member records
  • On Account using Case records
  • On Account using Opportunity records

Question 5

Question
A developer needs to provide a Visualforce page that lets users enter Product-specific details during a Sales cycle.How can this be accomplished? (Choose 2)
Answer
  • Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify
  • Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify
  • Copy the standard page and then make a new Visualforce page for Product data entry
  • Create a new Visualforce Page and an Apex controller to provide Product data entry

Question 6

Question
In a single record, a user selects multiple values from a multi-select pick list. How are the selected values represented in Apex? (Choose 1)
Answer
  • As a Set with each element as an element in the set
  • As a string with each value separated with a semicolon
  • As a string with each value separated with a comma
  • As a List with each element as an element in the list

Question 7

Question
Which action can a developer perform in a before update trigger? (Choose 2)
Answer
  • Change field values using the Trigger.new context variable
  • Display a custom error message in the application interface
  • Update the original object using an update DML operation
  • Delete the original object using a delete DML operation

Question 8

Question
On which object can an administrator create a roll-up summary field? (Choose 1)
Answer
  • Any object that is on the detail side of a master-detail relationship
  • Any object that is on the child side of a lookup relationship
  • Any object that is on the parent side of a lookup relationship
  • Any object that is on the master side of a master-detail relationship

Question 9

Question
Which statement should a developer avoid using inside procedural loops? (Choose 2)
Answer
  • System.debug('Amount of CPU time (in ms) used so far: ' + Limits.getCpuTime())
  • if(o.accountid == a.id)
  • update contactList
  • List contacts = [select id, email from Contact where accountId = :a.Id];

Question 10

Question
Which user can edit a record after it has been locked for approval? (Choose 2)
Answer
  • An administrator
  • Any user who approved the record previously
  • Any user with a higher role in the hierarchy
  • A user who is assigned as the current approver

Question 11

Question
A developer writes a SOQL query to find child records for a specific parent. How many levels can be returned in a single query? (Choose 1)
Answer
  • 5
  • 7
  • 1
  • 3

Question 12

Question
A developer has the following code: try { List nameList Account a String s = a.Name nameList.add (s) } catch (ListException le) { System.debug ('List Exception') } catch (NullPointerException npe) { System.debug('Null Pointer Exception') } catch (Exception e) { System.debug ('Generic Exception') } What message would be logged? (Choose 1)
Answer
  • Generic exception
  • List exception
  • NullPointer Exception
  • No message is logged

Question 13

Question
Which type of information is provided by the Checkpoints tab in the Developer Console? (Choose 2)
Answer
  • Namespace
  • Time
  • Debug Statement
  • Exception

Question 14

Question
A developer needs to know if all tests currently pass in a Salesforce environment. Which feature can the developer use? (Choose 2)
Answer
  • Workbench Metadata Retrieval
  • ANT Migration Tool
  • Salesforce UI Apex Test Execution
  • Developer Console

Question 15

Question
What is an important consideration when developing in a multi-tenant environment? (Choose 1)
Answer
  • Unique domain names take the place of namespaces for code developed for multiple orgs on multiple instances
  • Polyglot persistence provides support for a global
  • Governor limits prevent tenants from impacting performance in multiple orgs on the same instance
  • Org-wide data security determines whether other tenants can see data in multiple orgs on the same instance

Question 16

Question
A developer creates a customer controller and custom Visualforce page by using the following code block: public class myController { public String myString; public String getMyString() { return getMyString'; } public String getStringMethod1() { return myString; } public String getStringMethod2() { if (myString == null) myString = 'Method2'; return myString; } } <apex:page controller="myController"> {!myString}, {!StringMethod1}, {!StringMethod2}, {!myString} </apex:page> What does the user see when accessing the custom page? (Choose 1)
Answer
  • getMysString, , Method2, getMyString
  • , , Method2, getMyString
  • , , Method2,
  • getMyString, , ,

Question 17

Question
A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class? (Choose 1)
Answer
  • Add the TestVisible attribute to the Apex methods
  • Add the SeeAllData attribute to the test class
  • Add the SeeAllData attribute to the test methods
  • Add the TestVisible attribute to the Apex class

Question 18

Question
A Visualforce page has a standard controller for an object that has a lookup relationship to a parent object. How can a developer display data from the parent record on the page? (Choose 1)
Answer
  • By using SOQL on the Visualforce page to query for data from the parent record
  • By adding a second standard controller to the page for the parent record
  • By using merge field syntax to retrieve data from the parent record
  • By using a roll-up formula field on the child record to include data from the parent record

Question 19

Question
A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization? (Choose 1)
Answer
  • Apex Controllers
  • Anonymous Blocks
  • Apex Triggers
  • HTTP Callouts

Question 20

Question
A company wants a recruiting app that models candidates and interviews displays the total number of interviews for each candidate record and defines security on interview records that is independent from the security on candidate records. What would a developer do to accomplish this task. (Choose 2)
Answer
  • Create a lookup relationship between the Candidate and Interview objects
  • Create a master-detail relationship between the Candidate and Interview objects
  • Create a trigger on the Interview object that updates a field on the Candidate object
  • Create a roll-up summary field on the Candidate object that counts Interview records

Question 21

Question
A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits? (Choose 1)
Answer
  • By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of DML statements is exceeded
  • By using Limits.getDMLRows() and then displaying an error message before the number of DML statements is exceeded
  • By using Messaging.SendEmail() to continue the transaction and send an alert to the user after the number of DML statements is exceeded
  • By using ApexMessage.Message() to display an error message after the number of DML statements is exceeded

Question 22

Question
What is a benefit of a Lightining Component framework? (Choose 1)
Answer
  • More centralized control via server-side logic
  • Better integration with Force.com sites
  • Better performance for custom Salesforce1 Mobile apps
  • More pre-built components to replicate the Salesforce look and feel

Question 23

Question
The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record. (Choose 1)
Answer
  • Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field
  • Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field
  • Create a Workflow Rule on the Opportunity object that updates a field on the parent Account
  • Create a trigger on the Account object that queries the Close Date of the most recent Opportunities

Question 24

Question
What is the value of x after the code segment executes? String x = ‘A’; Integer I = 10; if (I < 15) { I = 15; x = ‘B’; } else if ( I < 20) { x = ‘C’; } else { x = ‘D’; } (Choose 1)
Answer
  • C
  • B
  • D
  • A

Question 25

Question
What is an accurate constructor for a custom controller named 'MyController'? (Choose 1)
Answer
  • public MyController () { account = new Account() }
  • public MyController (SObject obj) { account = (Account) obj }
  • public MyController (List<SObject> objects) { accounts = (List <Account>)objects }
  • public MyController (ApexPages.StandardController stdController) { account = (Account) stdController.getRecord() }

Question 26

Question
Which code block returns the ListView of an Account object using the following debug statement? System.debug (controller.getListViewOptions()) (Choose 1)
Answer
  • ApexPages.StandardSetController controller = new ApexPages.StandardSetController ([SELECT Id FROM Account LIMIT 1])
  • ApexPages.StandardController controller = new ApexPages.StandardController ([SELECT Id FROM Account LIMIT 1])
  • ApexPages.StandardSetController controller = new ApexPages.StandardSetController (Database.getQueryLocator('select Id from Account Limit 1'))
  • ApexPages.StandardController controller = new ApexPages.StandardController (Database.getQueryLocator('select Id from Account Limit 1'))

Question 27

Question
A reviewer is required to enter a reason in the comments field only when a candidate is recommended to hired. Which action can a developer take to enforce this requirement? (Choose 1)
Answer
  • Create a required Visualforce component
  • Create a required comments field
  • Create a validation rule
  • Create a formula field

Question 28

Question
Which type of code represents the Controller in the MVC architecture on the Force.com platform? (Choose 2)
Answer
  • StandardController system methods that are referenced by Visualforce
  • A static resource that contains CSS and images
  • Custom Apex and JavaScript code that is used to manipulate data
  • JavaScript that is used to make a menu item display itself

Question 29

Question
What is a valid source and destination pair that can send or receive change sets? (Choose 2)
Answer
  • Developer edition to sandbox
  • Developer edition to production
  • Sandbox to sandbox
  • Sandbox to production

Question 30

Question
Which declarative method helps ensure quality data? (Choose 3)
Answer
  • Page layouts
  • Workflow alerts
  • Lookup filters
  • Validation rules
  • Exception handling

Question 31

Question
A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? (Choose 2)
Answer
  • Use SOQL to query Case records in the org to get all the RecordType values available for Case
  • Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues()
  • Use Schema.RecordTypeInfo returned by Case.SObjectType.getDescribe().getRecordTypeInfos()
  • Use SOQL to query Case records in the org to get all values for the Status picklist field

Question 32

Question
What is a capability of formula fields? (Choose 3)
Answer
  • Determine which of the three different images to display using the IF function
  • Return and display a field value from another object using the VLOOKUP function
  • Display the previous value for a field using the PRIORVALUE function
  • Determine if a datetime field has passed using the NOW function
  • Generate a link using the HYPERLINK function to a specific record in a legacy system

Question 33

Question
Which statement about change set deployments is accurate? (Choose 3)
Answer
  • They can be used to deploy custom settings data
  • They can be used to transfer Contact records
  • They use an all or none deployment model
  • They can be used only between related organizations
  • They require a deployment connection

Question 34

Question
Where would a developer build a managed package? (Choose 1)
Answer
  • Partial Copy Sandbox
  • Developer Sandbox
  • Unlimited Edition
  • Developer Edition

Question 35

Question
Which scenario is invalid for execution by unit tests? (Choose 1)
Answer
  • Executing methods as different users
  • Executing methods for negative test scenarios
  • Loading the standard Pricebook ID using a system method
  • Loading test data in place of user input for Flows

Question 36

Question
What is a valid way of loading external Javascript files into a Visualforce page? (Choose 2)
Answer
  • Using a link tag
  • Using a script tag
  • Using an apex:includeScript tag
  • Using an apex:define tag

Question 37

Question
Which data type or collection of data types can SOQL statements populate or evaluate to? (Choose 3)
Answer
  • An integer
  • A String
  • A Single Sobject
  • A List of Sobjects
  • A Boolean

Question 38

Question
What is the proper process for an Apex unit test? (Choose 1)
Answer
  • Query for test data using SeeAllData=true. Call the method being tested. Verify that the results are correct.
  • Create data for testing. Call the method being tested. Verify that the results are correct.
  • Create data for testing. Execute runAllTests(). Verify that the results are correct.
  • Query for test data using SeeAllData=true. Execute runAllTests(). Verify that the results are correct.

Question 39

Question
How can a developer avoid exceeding governor limits when using an Apex trigger? (Choose 2)
Answer
  • By using the Database class to handle DML transactions
  • By using a helper class that can be invoked from multiple triggers
  • By performing DML transactions on lists of SObjects
  • By using Maps to hold data from query results

Question 40

Question
A developer has the following query: Contact c = [SELECT id firstname lastname email FROM Contact WHERE lastname = 'Smith'] What does the query return if there is no Contact with the last name 'Smith'? (Choose 1)
Answer
  • A Contact initialized to null
  • A Contact with empty values
  • An empty List of Contacts
  • An error that no rows are found

Question 41

Question
A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve the correct URL for the current Visualforce page? (Choose 1)
Answer
  • {!$Setup.Url_Settings__c.[Profile.Id].URL__c}
  • {!$Setup.Url_Settings__c.URL__c }
  • {!$Setup.Url_Settings__c.[$Profile.Id].URL__c}
  • {!$Setup.Url_Settings__c.Instance[Profile.Id].URL__c}

Question 42

Question
A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account's address using a SOQL query. The page will also allow the user to make edits to the address. Where would the developer write the Account address verification logic? (Choose 1)
Answer
  • In a Custom Controller
  • In a Standard Extension
  • In a Standard Controller
  • In a Controller Extension

Question 43

Question
What is an accurate statement about variable scope? (Choose 3)
Answer
  • Parallel blocks can use the same variable name
  • Sub-blocks cannot reuse a parent block's variable name
  • Sub-blocks can reuse a parent block's variable name if its value is null
  • A static variable can restrict the scope to the current block if its value is null
  • A variable can be defined at any point in a block

Question 44

Question
A developer needs to ensure there is sufficient test coverage for an Apex Method that interacts with Accounts. The developer needs to create test data. What is the preferred way to load this test data into Salesforce? (Choose 1)
Answer
  • By using HttpCalloutMocks
  • By using Documents
  • By using Static Resources
  • By using WebServiceTests

Question 45

Question
Which statement would a developer use when creating test data for products and pricebooks? (Choose 1)
Answer
  • Pricebook pb = new Pricebook ()
  • IsTest(SeeAllData = false)
  • List objList = Test.loadData(Account.sObjectType
  • Id pricebookId = Test.getStandardPricebookId()

Question 46

Question
A developer creates a workflow rule declaratively that updates a field on an object. An apex update trigger exists for the object What happens when a user updates a record? (Choose 1)
Answer
  • No changes are made to the data.
  • Both the apex trigger and workflow rule are fired only once.
  • The workflow rule is fired more than once.
  • The apex trigger is fired more than once.

Question 47

Question
In the code below what type does Boolean inherit from? Boolean b =true; (Choose 1)
Answer
  • Enum
  • Object
  • String
  • Class

Question 48

Question
A developer uses a before insert trigger on the lead object to fetch the Territpry__C object, Where the Territory__c.postalcode__c matches the lead.postalcode. The code fail when the developer uses the apex data loader to insert 10000 lead records. The developer has the following code block; (Choose 1) 01- for(lead L: trigger.new) 02 -{ 03 - if(L.postalcode !=null) 04 - { 05 - List<Territory__c> terrList=[select id from Territory__c where posatalcode__c :if(terrList.size() >0{L.territory__c = 06 -terrList[0].id;} 07 - } 08 -} Which line of code is causing the code block to fail?
Answer
  • 03: A soql query is located inside of the for loop code.
  • 01: Trigger.new is not valid in a before insert trigger.
  • 02: A nullpointer exception is thrown if postalcode is null
  • 05: The lead in a before insert trigger cannot be updated.

Question 49

Question
Why would a developer use Test.starttest() and Test.stoptest()? (Choose 1)
Answer
  • To avoid Apex code coverage requirements for the code between these lines.
  • To start and stop anonymous block execution when executing anonymous Apex code.
  • To indicate test code so that it does not impact apex line count governor limits.
  • To create an additional set of governor limits during the execution of a single test class.

Question 50

Question
What is true of a partial sandbox that is not true of a full sandbox? (Choose 2)
Answer
  • More frequent refreshes.
  • Only includes necessary metadata.
  • Use of change sets.
  • Limited to 5 GB of data.

Question 51

Question
In which order does salesforce execute events upon saving a record? (Choose 1)
Answer
  • Before Trigger; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit
  • Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit
  • Before Triggers; Validation Rules; After Triggers; Workflow Rules; Assignment Rules; Commit
  • Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit

Question 52

Question
What is a capability of cross-object formula fields? (Choose 3)
Answer
  • Formula fields can reference fields from master-detail or lookup parent relationships.
  • Formula fields can expose data the user does not have access to in a record.
  • Formula fields can be used in three roll-up summaries per object.
  • Formula fields can reference fields in a collection of records from a child relationship.
  • Formula fields can reference fields from objects that are up to 10 relationships away.

Question 53

Question
Which data structure is returned to a developer when performing a sosl search? (Choose 1)
Answer
  • A list of lists of sobjects.
  • A map of sObject types to a list of sObjects.
  • A map of sObject types to a lists of sObjects.
  • A list of SObjects.

Question 54

Question
A company that uses a custom object to track candidates would like to send candidate information automatically to a third-party human resources system when a candidate is hired. What can a developer do to accomplish this task? (Choose 1)
Answer
  • Create an escalation rule to the hiring manager.
  • Create an auto response rule to the candidate.
  • Create a process builder with an outbound message action.
  • Create a workflow rule with an outbound message action.

Question 55

Question
What is an accurate statement bout with sharing keyword? (Choose 2)
Answer
  • Inner classes do not inherit the sharing settings from the container class.
  • Both inner and outer classes can be declared as with sharing.
  • Either inner or outer classes can be declared as with sharing, but not both.
  • Inner classes inherit the sharing settings from the container class.

Question 56

Question
What is the minimum log level needed to see user- generated debug statements? (Choose 1)
Answer
  • DEBUG
  • FINE
  • INFO
  • WARN

Question 57

Question
A developer creates a new visualforce page and apex extension, and writes test classes that exercise 95% coverage of the new apex extension. changeset deployment to production fails with the test coverage warning; "average test coverage across all apex classes and triggers is 74%, at least 75% test coverage is required." What can the developer do to successfully deploy the new visualforce page and extension? (Choose 1)
Answer
  • Create test classes to exercise the visualforce page markup.
  • Select “Disable parallel apex testing" to run all the tests.
  • Add test methods to existing test classes from previous deployments.
  • Select "Fast Deployment" to bypass running all the tests.

Question 58

Question
A developer needs to automatically populate the ReportsTo field in a contact record based on the values of the related Account and Department fields in the contact record. What type of trigger would the developer create? (Choose 2)
Answer
  • Before Update.
  • After Insert.
  • Before Insert.
  • After Update

Question 59

Question
What is a valid apex statement? (Choose 1)
Answer
  • Map conMap =[SELECT Name FROM Contact];
  • Account[] acctList = new List<Account>{ new Account() };
  • Integer w, x, y =123, z='abc';
  • Private static constant Double rate =7.75;

Question 60

Question
Which type of code represents the controller in MVC architecture on the Force.com Platform? (Choose 2)
Answer
  • JavaScript that is used to make a menu item display itself.
  • StandardContoller system methods that are referenced by visualforce.
  • Custom apex and javascript code that is used to manipulate data.
  • A static resource that contains CSS and images.
Show full summary Hide full summary

Similar

Cell Structure
daniel.praecox
GCSE History of Medicine: Key Individuals
James McConnell
Statistics Equations & Graphs
Andrea Leyden
1PR101 2.test - Část 19.
Nikola Truong
What were the Cause and Consequences of The Cuban Missile Crisis October 1962
Mel Taylor
Mapa Mental para Resumir y Conectar Ideas
ulises leon
Mapa Conceptual
karen michel montaño lopez
Mapa Conceptual
Victor Ivan Perez Morales
auditoria administrativa
karen cortes
unidad 3 -DIBUJO DEL CONJUNTO- JUAN SUAREZ
Juan Carlos Suarez Gomez
aspectos normativos para la declaración del Impuesto a los Consumos Especiales
MARIA BRAVO