A team of many developers work in their own individual orgs that have the same configuration as the production org.
Which type of org is best suited for this scenario?
A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes.
The following code is executed in the Developer Console using the Execute Anonymous window:
How many total accounts will be in the org after this code is executed?
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat:
ist
return Database.query('SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like
s'+lastName+'s'")?;
What are two ways the developer can update the method to prevent a SOQL injection attack?
Choose 2 answers
Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?
A developer creates a custom exception as shown below:
public class ParityException extends Exception { }
What are two ways the developer can fire the exception in Apex?
In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?
Choose 2 answers
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?
Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as a picklist value for the Status _c custom field within the Container _c object.
Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted?
Choose 2 answers
Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1, 000,000. A developer created the following trigger on the Account object to satisfy this requirement.
for (Account a : Trigger.new) {
if (a.AnnualRevenue > 1000000) {
List
if (oppList.size() == 0) {
Opportunity oppty = new Opportunity(Name = a.Name, StageName = 'Prospecting', CloseDate = System.today().addDays(30));
insert oppty;
}
}
}
Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with system, Exception errors.
Which two actions should the developer take to fix the code segment shown above?
Choose 2. answers
A developer is asked to write helper methods that create test data for unit tests.
What should be changed in the TestUtils class so that its methods are only usable by unit test methods?
A company's engineering department is conducting a month-long test on the scalability of an in-house-developed software that requires a cluster of 100 or more servers. Which of the following models is the best to use?
A developer writes a trigger on the Account object on the before update event that increments a count field. A record triggered flow also increments the count field every time that an Account is created or updated.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?
A developer wants to improve runtime performance of Apex calls by caching results on the client.
What is the most efficient way to implement this and follow best practices?
Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. They also allow sales reps to upload CSV files with thousands of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system.
After the status for an Order__c is first set to 'Placed', the order information must be sent to a REST endpoint in the ERP system that can
process one order at a time.
What should the developer implement to accomplish this?
A developer wants to send an outbound message when a record meets a specific criteria.
Which two features satisfy this use case?
What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface?
Choose 2 answers
A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service
agent must gather many pieces of information. A developer is tasked to implement this functionality.
What should the developer use to satisfy this requirement in the most efficient manner?
A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount' 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?
Choose 2 answers
The following Apex method is part of the ContactService class that is called from a trigger:
How should the developer modify the code to ensure best practices are met?
A)
B)
C)
D)
A software company uses the following objects and relationships:
* Case: to handle customer support issues
* Defect__c: a custom object to represent known issues with the company's software
* Case Defect__c a junction object between Case and Defect __c to represent that a defect is a cause of a customer issue
Case and Defect__c have Private organization-wide defaults.
What should be done to share a specific Case_Defect__c record with a user?
What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers?
(Full question statement)
Universal Containers recently transitioned fromClassic to Lightning Experience. One of its business processes requirescertain values from the Opportunity objectto be sent via anHTTP REST calloutto itsexternal order management systemwhen the user presses a custom button on the Opportunity detail page.
Example fields:
Name
Amount
Account
Which two methods should the developer implement to fulfill the business requirement?
Choose 2 answers.
A developer needs to confirm that a Contact trigger works correctly without changing the organization's data.
What should the developer do to test the Contact trigger?
A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface.
apex
Copy
public interface PaymentProcessor {
void pay(Decimal amount);
}
Which is the correct implementation to use the PaymentProcessor interface class?
If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?
Choose 2 answers
A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page.
Which component should be added to the Visualforce page to display the message?
Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.
UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.
Which method should be used to calculate the estimated ship date for an Order?
What is the result of the following code snippet?
public word doWork(Account acct) {
for (Integer i = 0; i <= 2007 i++) {
insert acct;
}
The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:
Which governor limit will likely be exceeded within the Apex transaction?
What are three characteristics of change set deployments?
Choose 3 answers Sending a change set between two orgs requires a deployment connection.
A developer wants to mark each Account in a List
Which Apex technique should the developer use?
Given the following Apex statement:
Account myAccount = [SELECT Id, Name FROM Account);
What occurs when more than one Account is returned by the SOQL query?
Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine-tuned and provides a seamless user experience.
What are some benefits of using the Lightning Component framework?
A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?
Universal Containers decides to use exclusively declarative development to build out a new Salesforce application.
Which three options should be used to build out the database layer for the application?
Choose 3 answers
What are three considerations when using the @lnvocableMethod annotation in Apex?
Choose 3 answers
Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?
The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?
A developer is tasked with building a custom Lightning web component to collect Contact information.
The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.
What should the developer use in their Lightning Web Component to support the security requirements?
While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.
Why did the method fail in the sandbox test framework but succeed in the Developer Console?
When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
(Full question statement)
Which code displays the contents of a Visualforce page as a PDF?
A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended?
A custom picklist field, Pool Preference ¢, exists on a custom object. The picklist contains the following options: ‘Vegan’, ‘Kosher’, 'No Preference’. The developer must ensure a value is populated every time a record is created or updated.
What is the optimal way to ensure a value is selected every time a record is saved?
Which three resources in an Aura component can contain JavaScript functions?
Choose 3 answers
(Full question statement)
A developer is tasked with building a custom Lightning Web Component (LWC) to collectContactinformation. The form will be shared among different types of users in the org. There are security requirements stating that only certain fields should beeditable and visibleto certain groups of users.
What should the developer use in their Lightning Web Component to support the security requirements?
(Full question statement)
Universal Containers wants Opportunities to no longer be editable when they reach the Closed/Wonstage.
Which two strategies can a developer use to accomplish this?
Choose 2 answers.
Which two are best practices when it comes to Aura component and application event handling?
Choose 2 answers
A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?