Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

Prova Recente (10/06/2023)

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

1) 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?

Resposta: Roll-up summary field


-------------------------------------------------

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?

Reposta: Flow Builder


--------------------------------------------------

3) Refer to the code snippet below:


import fetchOpps from '@salesforce/apex/OpportunitySearch.fetchOpportunities';

@wire(fetchOpps)
opportunities

When a Lightning web component is rendered, a list of opportunities that match


certain criteria should be retrieved from the database and displayed to the end
user.

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
----------------------------------------------------

4) Which action may cause triggers to fire?

Resposta: Update to Feed Items

Questão relativamente difícil


-----------------------------------------------------

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?

Resposta: Prebuilt component that can be reused.


-----------------------------------------------------

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

Questão relativamente difícil.


-----------------------------------------------------

9) How should a developer write unit tests for a private method in an Apex class?

Resposta: Use the TestVisible annotation


-----------------------------------------------------

10) What are three ways for 2 developer to execute tests in an org? Choose 3
answers

Resposta:
* Tooling API
* SalesforceDX
* Setup Menu
-----------------------------------------------------

11) What are three characteristics of change set deployments?


Choose 3 answers

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.

Questão relativamente difícil


-----------------------------------------------------

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?

Resposta: Use Test.getStandardPricebookid() to get the standard price book ID.


----------------------------------------------------

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*/}
}
----------------------------------------------

16) A developer has the following requirements:


* Calculate the total amount on an Order.
* Calculate the line amount for each Line Item based on quantity selected and price
* Move Line Items to a differect Order if a Line Item is not in stock.
Which relationship implementation supports these requirements on its own.

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.

Questão relativamente difícil.


---------------------------------------------------

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.
-------------------------------------------------

Volta na questão 20 da referida prova.

You might also like