How can a developer set up a debug log on a specific user?
A. It is not possible to setup debug logs for users other than yourself.
B. Ask the user for access to their account credentials, log in as the user and debug the issue.
C. Create Apex code that logs code actions into a custom object.
D. Set up a trace flag for the user, and define a logging level and time period for the trace.
A developer has the following requirements:
Calculate the total amount on an Order.
Calculate the line amount for each Line Item based on quantity selected and price.
Move Line Items to a different Order if a Line Item is not stock.
Which relationship implementation supports these requirements?
A. Line Items has a Master-Detail field to Order and the Master can be re-parented.
B. Line Item has a Lookup field to Order and there can be many Line Items per Order
C. Order has a Lookup field to Line Item and there can be many Line Items per Order.
D. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.
Which two approaches optimize test maintenance and support future declarative configuration changes? Choose 2 answers.
A. Create a method that queries for valid records, then call this method within test methods.
B. Create a methods that loads valid Account records from a static resources, then call this method within test methods.
C. Create a method that performs a callout for valid records, then call this method within test methods.
D. Create a method that creates valid records,then call this method within test methods.
An Approval Process is defined in the Expense_Item__c. A business rule dictates that whenever a user changes the Status to 'Submitted' on an Expense_Report__c record, all the Expense_Item__c records related to the expense report must enter the approval process individually. Which approach should be used to ensure the business requirement is met?
A. Create a Process Builder on Expense_Report__c with a 'Submit for Approval' action type to submit all related Expense_Item__c records when the criteria is met.
B. Create two Process Builder, one on Expense_Report__c to mark the related Expense_Item__c as submittable and the second on Expense_Item__c to submit the records for approval.
C. Create a Process Builder on Expense_Report__c to mark the related Expense_Item__c as submittable and trigger on Expense_item__c to submit the records for approval.
D. Create a Process Builder on Expense_Report__c with an 'Apex' action type to submit all related Expense_Item__c records when the criteria is met.
A developer is creating a Visualforce page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user's default record type?
A. Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.
B. Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current user's default record type
C. Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method.
D. Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos() to get a list of record types, and iterate trought them until isdefaultRecordTypeMapping() is true.
A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?
A. Add a System.debug() statement before the insert method
B. Add a try/catch around the insert method
C. Set the second insert method parameter to TRUE
D. Collect the insert method return value a Saveresult record
A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?
A. @BeforeTest
B. @isTest(SeeAllData=True)
C. @TestSetup
D. @PreTest
A developer runs the following anonymous code block:
List
(acc);system.debug(Limits.getDMLStatements()+ `, `
+Limits.getLimitDMLStatements());
What is the result?
A. 11, 150
B. 150, 2
C. 150, 11
D. 2, 150
A developer working on a time management application wants to make total hours for each timecard available to applications users. A timecard entry has a Master-Detail relationship to a timecard. Which approach should the developer use to accomplish this declaratively?
A. A visualforce page that calculates the total number of hours for a timecard and displays it on the page.
B. An Apex trigger that uses an Aggregate Query to calculate the hours for a given timecard and stores it in a custom field.
C. A Roll-up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard.
D. A Process Builder process that updates a field on the timecard entry is created.
A developer must create a Lightning component that allows user to input Contact record information to create a Contact record, including a Salary__c custom field. What should the developer use, along with a lightning-record-edit-form, so that Salary__c field functions as a currency input and is only viewable and editable by users that have the correct field level permissions on Salary__c?
A.
B.
C.
D.