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?
Consider the following code snippet:
Given the multi-tenant architecture of the Salesforce platform, what Is a best practice a developer should Implement and ensure successful execution of the method?
A developer is creating a Lightning web component to showa list of sales records.
The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all
fields on the record except the commission field.
How should this be enforced so that the component works for both users without showing any errors?
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?
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?
A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience.
What should the developer use to override the Contact's Edit button and provide this functionality?
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?
In the following example, which starting context will mymethod execute it is invoked?
Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts.
The component should be able to validate the user input before saving the information to the database.
What is the best technology to create this component?
A developer has an integer variable called maxAttempts. The developer meeds to ensure that once maxAttempts is initialized, it preserves its value for the lenght 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?
An Apex method, getAccounts, that returns a list of Accounts given a searchTern, is available for Lightning Web
Components to use.
What is the correct definition of a Lightning Web Component property that uses the getAccounts method?
A)
B)
C)
D)
Given the following Anonymous Block:
Which one do you like?
What should a developer consider for an environment that has over 10,000 Case records?
What are three ways for 2 developer to execute tests in an org? Choose 3 answers
Universal Container wants Opportunities to no longer be editable when reaching the Clousd stage.
How should a develoiper accomplish this?
A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:
How can a developer use the Laptop Interface within the Silvertaptop class?
Universal Containers has a Visualforce page that displays a table of every Container__c being rented by a given Account. Recently this
page is failing with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?
Refer to the following code snippet for an environment that has more than 200 Accounts belonging to the Technology' industry:
which three statements are accurate about debug logs?
Choose 3 answers
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 it's trainers?
Which salesforce org has a complete duplicate copy of the production org including data and configuration?
A developer is asked to write helper methods that create test data for unit tests.
What should be changed in the Testvtils class so that its methods are only usable by unit test methods?
What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers
The sales management team at Universal Container requires that the Lead Source field of the Lead record be populated when a.. converted.
What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?
Which two settings must be defined in order to update a record of a junction object? Choose 2 answers
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?
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?
Which two sfdx commands can be used to add testing data to a Developer sandbox?
If apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which statement are true regarding governor limits? Choose 2 answers
Universal Containers has a Visualforce page that displays a table of every Container_c. being ……. Is falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?
Which two are best practices when it comes to component and application event handling? (Choose two.)
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?
Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers
What are two ways a developer can get the status of an enquered job for a class that queueable interface? Choose 2 answers
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 development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers
A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?
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 developer considers the following snippet of code:
Based on this code, what is the value of x?
A developer needs to create a baseline set of data (Account, Contacts, Products, Assets) for an entire suite allowing them to test independent requirements for various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?
An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity.
Which update should the developer make in the Flow?
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.
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 Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute complex validation involving several types of objects.
When creating the Apex method, which annotation should a developer use to ensure the method
Can be used within the flow?
A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c.
As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able t
report multiple bugs and bugs can also be reported by multiple companies.
What is needed to allow this reporting?
which statement is true regarding execution order when triggers are associated to the same object and event?
Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?
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?
Uniersal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create.
In the first steps of collecting information, UC’s ERP system must be checked via as a REST endpoint to see if the customerexists. If the customer exists, the data must be presented to the sales rep in Salesforce.
Which two should a developer implement to satisfy the requirements?
Choose2 answer
Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address". Which field should the developer ad to create the most efficient model that supports the business need?
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? ns
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?
When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers
A custom picklist field, Food_Preference__c, exist 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 most efficient way to ensure a value is selected every time a record is saved?
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
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? Choose 2 answers
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 developer created these three Rollup Summary fields in the custom object, Project__c:
The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
Which should the developer use to implement the business requirement in order to minimize maintenance overhead?
Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permission for the currently logged-in user while using the custom search tool?
Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.
What is the best practice to get the sum of all Order Line item totals on the Order record?
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 click a button called.. component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?
Which three operations affect the number of times a trigger can fire?
Choose 3 answers