Free preview mode
Enjoy the free questions and consider upgrading to gain full access!
CRT-450
Free trial
Verified
Question 26
A developer needs to save a List of existing Account records named myAccounts to the database, but the records do not contain Salesforce Id values. Only the value of a custom text field configured as an External ID with an API name of Foreign_Key__c is known.
Which two statements enable the developer to save the records to the database without an Id? (Choose two.)
- A: Upsert myAccounts Foreign_Key__c;
- B: Upsert myAccounts(Foreign_Key__c);
- C: Database.upsert (myAccounts, Foreign_Key__c);
- D: Database.upsert(myAccounts).Foreign_Key__c;
Question 27
Which standard field is required when creating a new Contact record?
- A: LastName
- B: Name
- C: AccountId
- D: FirstName
Question 28
An org has a data model with a Buyer__c object that has a lookup relationship to Region__c and a Supplier__c object has a lookup relationship to Region___c.
How can a developer display data from the related Supplier__c records on a Visualforce page that has a standard controller for the Buyer__c object?
- A: Use rollup formula fields on the Buyer__c object to reference the related Supplier__c records through the Region__c.
- B: Use SOQL in a controller extension to query for related Supplier__c records.
- C: Use a second standard controller for the Region__c object on a page to display the related Supplier__c records.
- D: Use merge field syntax to retrieve the Supplier__c records related to the Buyer__c record through the Region__c.
Question 29
What can be used to delete components from production?
- A: A change set deployment with a destructiveChanges XML file
- B: A change set deployment with the delete option checked
- C: An ant migration tool deployment with a destructiveChanges XML file and an empty package.xml file
- D: An ant migration tool deployment with a desctuctiveChanges XML file and the components to delete in the package.xml file
Question 30
What are three techniques that a developer can use to invoke an anonymous block of code? (Choose three.)
- A: Use the SOAP API to make a call to execute anonymous code.
- B: Create a Visualforce page that uses a controller class that is declared without sharing.
- C: Run code using the Anonymous Apex feature of the Developer's IDE.
- D: Type code into the Developer Console and execute it directly.
- E: Create and execute a test method that does not specify a runAs() call.
Question 31
Which approach should be used to provide test data for a test class?
- A: Query for existing records in the database.
- B: Execute anonymous code blocks that create data.
- C: Use a test data factory class to create test data.
- D: Access data in @TestVisible class variables.
Question 32
An after trigger on the Account object performs a DML update operation on all of the child Opportunities of an Account. There are no active triggers on the
Opportunity object, yet a maximum trigger depth exceeded error occurs in certain situations.
Which two reasons possibly explain the Account trigger firing recursively? (Choose two.)
- A: Changes to Opportunities are causing cross-object workflow field updates to be made on the Account.
- B: Changes to Opportunities are causing roll-up summary fields to update on the Account.
- C: Changes are being made to the Account during an unrelated parallel save operation.
- D: Changes are being made to the Account during Criteria Based Sharing evaluation.
Question 33
Which statement is true about developing in a multi-tenant environment?
- A: Apex Sharing controls access to records from multiple tenants on the same instance.
- B: Org-level data security controls which users can see data from multiple tenants on the same instance.
- C: Governor limits prevent Apex from impacting the performance of multiple tenants on the same instance.
- D: Global Apex classes can be referenced from multiple tenants on the same instance.
Question 34
A developer needs an Apex method that can process Account or Contact records.
Which method signature should the developer use?
- A: public void doWork(Account | | Contact)
- B: public void doWork(Record theRecord)
- C: public void doWork(Account Contact)
- D: public void doWork(sObject theRecord)
Question 35
A developer needs to update an unrelated object when a record gets saved.
Which two trigger types should the developer create? (Choose two.)
- A: after insert
- B: before update
- C: before insert
- D: after update
Question 36
Which three statements are true regarding trace flags? (Choose three.)
- A: Setting trace flags automatically cause debug logs to be generated.
- B: Logging levels override trace flags.
- C: Trace flags override logging levels.
- D: If active trace flags are not set, Apex tests execute with default logging levels.
- E: Trace flags can be set in the Developer Console, Setup, or using the Tooling API.
Question 37
Which two conditions cause workflow rules to fire? (Choose two.)
- A: An Apex Batch process that changes field values.
- B: Updating records using the bulk API
- C: Converting leads to person accounts
- D: Changing the territory assignments of accounts and opportunities
Question 38
A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override.
What is the correct implementation of the ShippingCalculator class?
A.
B.
C.
D.
Question 39
A Licensed_Professional__c custom object exists in the system with two Master-Detail fields for the following objects: Certification__c and Contact.
Users with the Certification Representative role can access the Certification records they own and view the related Licensed Professionals records, however users with the Sales Representative role report they cannot view any Licensed Professional records even though they own the associated Contact record.
What are two likely causes of users in the Sales Representative role not being able to access the Licensed Professional records? (Choose two.)
- A: The organization has a private sharing model for Certification__c. and Certification__c is the primary relationship in the Licensed_Professional__c object.
- B: The organization's sharing rules for Licensed_Professional__c have not finished their recalculation process.
- C: The organization recently modified the Sales Representative role to restrict Read/Write access to Licensed_Professional__c.
- D: The organization has a private sharing model for Certification__c, and Contact is the primary relationship in the Licensed_Professional__c object.
Question 40
A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions.
How should the developer declare maxAttempts to meet these requirements?
- A: Declare maxAttempts as a private static variable on a helper class.
- B: Declare maxAttempts as a variable on a helper class.
- C: Declare maxAttempts as a member variable on the trigger definition.
- D: Declare maxAttempts as a constant using the static and final keywords.
Question 41
Which approach should a developer take to automatically add a Maintenance Plan to each Opportunity that includes an Annual Subscription when an opportunity is closed?
- A: Build a OpportunityLineItem trigger that adds a PriceBookEntry record.
- B: Build an OpportunityLineItem trigger to add an OpportunityLineItem record.
- C: Build an Opportunity trigger that adds a PriceBookEntry record.
- D: Build an Opportunity trigger that adds an OpportunityLineItem record.
Question 42
A developer wants to import 500 Opportunity records into a sandbox.
Why should the developer choose to use Data Loader instead of Data Import Wizard?
- A: Data Loader runs from the developer's browser.
- B: Data Loader automatically relates Opportunities to Accounts.
- C: Data Import Wizard does not support Opportunities.
- D: Data Import Wizard can not import all 500 records.
Question 43
Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?
- A: Event Monitoring Log
- B: Calendar Events
- C: Developer Log
- D: Asynchronous Data Capture Events
Question 44
Which three process automations can immediately send an email notification to the owner of an Opportunity when its Amount is changed to be greater than
$10,000? (Choose three.)
- A: Process Builder
- B: Escalation Rule
- C: Flow Builder
- D: Approval Process
- E: Workflow Rule
Question 45
Application Events follow the traditional publish-subscribe model.
Which method is used to fire an event?
- A: registerEvent()
- B: fireEvent()
- C: emit()
- D: fire()
Question 46
Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.
Which approach should a developer take to ensure calculateBodyFat() is accessible outside the package namespace?
- A: Declare the class and method using the public access modifier.
- B: Declare the class as global and use the public access modifier on the method.
- C: Declare the class as public and use the global access modifier on the method.
- D: Declare the class and method using the global access modifier.
Question 47
A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?
- A: Add custom controller attributes to display the message.
- B: Use a try/catch with a custom exception class.
- C: Include <apex:messages> on the Visualforce page.
- D: Perform the DML using the Database.upsert() method.
Question 48
A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchResults property is wired, should be used?
A.
B.
C.
D.
Question 49
What are two ways for a developer to execute tests in an org? (Choose two.)
- A: Tooling API
- B: Developer Console
- C: Metadata API
- D: Bulk API
Question 50
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)
- A: The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used.
- B: Test data is inserted once for all test methods in a class.
- C: Records created in the @testSetup method cannot be updates in individual test methods.
- D: The @testSetup method is automatically executed before each test method in the test class is executed.
Free preview mode
Enjoy the free questions and consider upgrading to gain full access!