Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers
Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which two options can be used to build out the business logic layer for this application?
Choose 2 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?
Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail relationship with the standard Account object.
Based on some internal discussions, the UC administrator tried to change the master-detail relationship to a lookup relationship, but was not able to do so.
What is a possible reason that this change was not permitted?
A developer identifies the following triggers on the Expense _c object:
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed?
Choose 2 answers
Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field.
Which consideration should the developer be aware of when deciding between SOQL and SOSL?
Choose 2 answers
A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet:
Public class CustomerOrder {
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
A developer created a trigger on a custom object. This custom object also has some dependent pick lists.
According to the order of execution rules, which step happens first?
Which three code lines are required to create a Lightning component on a Visualforce page?
Choose 3 answers.
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?
Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).
What should the UC development team use to automatically run tests as part of their CI process?
Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job
object that represents a job. Each applicant may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?
Which two settings must be defined In order to update a record of a junction object?
Choose 2 answers
A developer is working on a project to import data from an external system into Salesforce. The data contains sensitive information that should not be visible to all users in Salesforce.
What should the developer do to ensure that the data is secure?
What are two benefits of using declarative customizations over code?
Choose 2 answer
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 developer is creating a 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 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?
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?
Which two are phases in the Aura application event propagation framework?
Choose 2 answers
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?
Consider the following code snippet:
public static List
List
for (Id leadId : leadIds) {
result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);
}
return result;
}
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement to ensure successful execution of the method?
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 creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of the new Apex helper class.
Change Set deployment to production fails with the test coverage warning:
"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required."
What should the developer do to successfully deploy the new Apex trigger and helper class?
A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?
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?
A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which two options are.. of the Controller according to the MVC architecture?
Choose 2 answers
What are two considerations for deploying from a sandbox to production?
Choose 2 answers
A developer must create a Lightning component that allows users 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 developer is integrating with a legacy on-premise SQL database.
What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?
A custom object Trainer__c has a lookup field to another custom object Gym__c.
Which SOQL query will get the record for the Viridian City Gym and all it's trainers?
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?
A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet:
apex
Copy
public class CustomerOrder {
// code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers
Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.
Which Visualforce feature supports this requirement?
Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy
the code and associated configurations to the Production environment.
What is the recommended process for deploying the code and configurations to Production?
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?
While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?
Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.
What is the best solution to assign the case to the appropriate support representative?
The values 'High', 'Medium', and 'Low' are identified as common values for multiple picklists across different objects.
What is an approach a developer can take to streamline maintenance of the picklists and their values, while also restricting the values to the ones mentioned above?
A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.
Which tool should the developer use to troubleshoot query performance?
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?
What are three characteristics of change set deployments?
Choose 3 answers Sending a change set between two orgs requires a deployment connection.
Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?
Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.
When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce page.
What can the developer use to meet this business requirement?
A developer needs to allow users to complete a form on an Account record that will create a record for a custom object.
The form needs to display different fields depending on the user’s job role, The functionality should only be available to a small group of users.
Which three things should the developer do to satisfy these requirements?
Choose 3 answers
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?
Assuming that name is a String obtained by a Visualforce page, which two SOQL queries performed are safe from SOQL injection? (Choose two.)
Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the master object, to Application_c acting as the detail.
Within the Job__c object, a custom multi-select picklist, preferred _Locations__c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship.
Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the Preferred Locations__c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State.
What is the recommended tool a developer should use to meet the business requirement?
What should a developer do to check the code coverage of a class after running all tests?
How does the Lightning Component framework help developers implement solutions faster?
(Full question statement)
A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class.
public virtual class Payment {
public virtual void makePayment(Decimal amount) {
// implementation
}
}
Which is the correct implementation?
(Full question statement)
Which code displays the contents of a Visualforce page as a PDF?
Which code in a Visualforce page and/or controller might present a security vulnerability?
A developer wants to send an outbound message when a record meets a specific criteria.
Which two features satisfy this use case?