Professional Documents
Culture Documents
Prova Mais Recente
Prova Mais Recente
Link: https://www.freecram.net/question/Salesforce.CRT-450.v2023-10-06.q76/
universal-containers-has-implemented-an-order-management-application-each-order-
can-have-one-or-more
What is the best practice to get the sum of all Order Line Item totals on the Order
record?
2) A company wants to implement a new call center process for handling customer
service calls. It requires services reps to ask for the caller's account number
account number before proceeding with the rest of their call script. Following best
practices, what is the optimal approach to satisfy this requirement?
@wire(fetchOpps)
opportunities
Resposta:
* The method must be annoted with the AuraEnabled annotation
* The method must specify the (cacheable-true) attribute
* The method cannot mutate the result set retrieved from the database
----------------------------------------------------
5) A Visual Flow uses and apex Action to provide additional information about
multiple Contacts, stored in a custom class, contactInfo. Which is the correct
definition of the Apex method that gets additional information?
Resposta:
@invocableMethod(label='Additional Info')
public static List<ContactInfo> getInfo(List<Id> contactIds){
/*Implementation*/
}
-----------------------------------------------------
6) What does the Lightning Component framework provides to developers?
7) Universal Containers store the availability date on each Line Item of an Order
and Orders are only shipped when all of the Line Items are available. Which method
should be used to calculate the estimated ship date for an Order?
Resposta: Use a Max Roll-up Summary field on the Lastest availability date fields.
-----------------------------------------------------
8) Which two sfdx commands can be used to add testing data to a Developer sandbox?
Reposta:
* Forced: data:bulk:upaser
* Forced: data: tree: upsert
9) How should a developer write unit tests for a private method in an Apex class?
10) What are three ways for 2 developer to execute tests in an org? Choose 3
answers
Resposta:
* Tooling API
* SalesforceDX
* Setup Menu
-----------------------------------------------------
Resposta:
* Change sets can deploy custom settings data.
* Change sets can be used to transfer records.
* Sending a change set between two orgs requires a deployment connection.
12) Which three resources in an Aura Component can contain Javascript functions?
Resposta:
* Renderer
* Controllers
* Helper
-----------------------------------------------------
13) What are two ways for a developer to execute tests in an org?
Resposta:
* Developer console
* Tooling API
----------------------------------------------------
14) 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?
15) A developer needs to implement a custom SOAP Web Service that is used by an
external Web Application. The developer chooses to Include helper methods that are
not used by the Web Application In the Implementation of the Web Service Class.
Which code segment shows the correct declaration of the clase and methods.
Resposta:
global class WebServiceClasse{
private Boolean helperMethod(){/*Implementation*/}
webservice static String updateRecords(){/*Implementation*/}
}
----------------------------------------------
Resposta:
Line item has a re-parentable master-detail field to Order
------------------------------------------------
17) What should a developer do to check the code coverage of a class after running
all tests?
Resposta: View the Class test Percentage tab on the Apex Class list view in
Salesforce Setup.
18) 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?
Resposta:
@AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term){/* implementation */}
----------------------------------------------------
19) A developer write a trigger on the Account object on the before update event
that increments a count field. A workflow rule also increments the count field
every time that an Account is created or updated. The field update in the workflow
rule is configured to not re-evaluate workflow rules.
What is the value of the count field if Account is inserted with an initial value
of zero, assuming no other automation logic is implemented on the Account?
Reposta: 2, o campo inicia com o valor zero, a workflow dispara e preenche o campo
com o valor de 1 (em memória), em seguida a trigger é executada no contexto de
before update e incrementa mais 1 no valor.
-------------------------------------------------
20) A developer has identified a method in an Apex class that performs resource
intensive actions in memory by iterating over the result set of a SOQL statement on
the account. The method also performs a DML statement to save the changes to the
datadase.
Which two techniques should the developer implement as a best practice to ensure
transaction control and avoid exceeding governor limits?
Reposta:
* Use the System.Limit class monitor the current CPU governor limit consumption
* Use the Database.Savepoint to enforce database integrity.
-------------------------------------------------