How should the Developer overcome this problem?

While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org. How should the Developer overcome this problem?A . Use Test.getStandardPricebookId() to get the standard PriceBook IC . Use @IsTest(SeeAllData=true) and delete the existing standard...

June 6, 2021 No Comments READ MORE +

Which two will restrict the records correctly?

A developer must create an Apex class, contactcontroller, that a Lightning component can use to search for Contact records. User of the Lightning component should only be able to search Contact records to which they have access. Which two will restrict the records correctly?A . public class ContactControllerB . public...

June 6, 2021 No Comments READ MORE +

How should the developer prevent a cross site scripting vulnerability?

A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability?A . ApexPages.currentPage() .getParameters() .get('url_param')B . ApexPages.currentPage() .getParameters() .get('url_param') .escapeHtml4()C . String.ValueOf(ApexPages.currentPage() .getParameters() .get('url_param'))D . String.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get('url_param'))View AnswerAnswer: D

June 6, 2021 No Comments READ MORE +

Which method signature should the developer use?

A developer needs an Apex method that can process Account or Contact records. Which method signature should the developer use?A . Public void doWork(Record theRecord)B . Public void doWork(sObject theRecord)C . Public void doWork(Account Contact)D . Public void doWork(Account || Contatc)View AnswerAnswer: B

June 6, 2021 No Comments READ MORE +

can only be assigned one time?

A developer is implementing an Apex class for a financial system. Within the class, the variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time?...

June 6, 2021 No Comments READ MORE +

What should the developer do to ensure the data is available to the test?

A developer needs to have records with specific field values in order to test a new Apex class. What should the developer do to ensure the data is available to the test?A . Use Anonymous Apex to create the required data.B . Use SOQL to query the org for the...

June 5, 2021 No Comments READ MORE +

What is the appropriate publish/subscribe logic to meet these requirements?

Universal Containers (UC) decided it will not to send emails to support personnel directly from Salesforce in the event that an unhandled exception occurs. Instead, UC wants an external system be notified of the error. What is the appropriate publish/subscribe logic to meet these requirements?A . Publish the error event...

June 5, 2021 No Comments READ MORE +

Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?

A developer needs to join data received from an integration with an external system with parent records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign key attribute that can be used to identify the parent. Which action...

June 4, 2021 No Comments READ MORE +

When the code execution, which two events occur as a result of the Apex transaction?

Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry: When the code execution, which two events occur as a result of the Apex transaction? Choose 2 answersA . If executed in an asynchronous context, the apex transaction is likely to...

June 4, 2021 2 Comments READ MORE +

What are two ways that a controller and extension can be specified on a Visualforce page?

What are two ways that a controller and extension can be specified on a Visualforce page? Choose 2 answersA . a@pex:page=Account extends="myControllerExtension"B . Qo apex:page standardController="Account" extensions="myControllerExtension”C . apex:page controllers="Account, myControllerExtension”D . apex:page controller="Account” extensions="myControllerExtension"”View AnswerAnswer: B,D

June 4, 2021 No Comments READ MORE +