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

3.

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. <lightning-input-currency value="salary_c">
</lightning-input-currency>

B. <lightning-input-field field-name="Salary_c">
</lightning-input-currency>

C. <lightning-formatted-number value="Salary_6" format-style="currency">


</lightning-formatted-numbers>

D. <lightning-input type="number" value="salary_c" formatter="currency">


</lightning-input>
Ans - B
-----------------------------------------------------------------------------------
-----------------
4. 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?
A. AppExchange
B. Developer Console
C. Visual Studio Code IDE
D. Setup Menu
Ans - B
-----------------------------------------------------------------------------------
---
5. 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. Rich component ecosystem
B. Self-contained and reusable units of an application
C. Server-side run-time debugging
D. Automatic code generation
Ans- A,B
-----------------------------------------------------------------------------------
---------------------
6. A developer writes a single trigger on the Account object on the after insert
and after update events. A workflow rule modifies
a field every time an Account is created or updated.
How many times will the trigger fire if a new Account is inserted, assuming no
other automation logic is implemented on the Account?
A. 8
B. 4
C. 1
D. 2
Ans - D
-----------------------------------------------------------------------------------
-----------------
7. A developer receives an error when trying to call a global server-side method
using the remoteAction decorator.
How can the developer resolve the error?
A. Decorate the server-side method with (static=true).
B. Change the function signature to be private static.
C. Decorate the server-side method with (static=false).
D. Add static to the server-side method signature.
Ans - D
----------------------------------------------------------------------------
8. 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. View the Apex Flex Queue
B. View the Apex Jobs Page
c. View the Apex Status Page
D. Query the AsyncApex Job object
Ans - B,D
--------------------------------------------------------------------------
9. Which two operations can be performed using a formula field?
Choose 2 answers
A. Displaying the last four digits of an encrypted Social Security number
B. Triggering a Process Builder
C. Displaying an Image based on the Opportunity Amount
D. Calculating a score on a Lead based on the information from another field
Ans- C,D

-----------------------------------------------------------------------------------
10. Which Lightning code segment should be written to declare dependencies on a
Lightning component, c:accountList, that is used in a Visualforce page?

A.<aura : application access="GLOBAL" extends="itng: outApp">


<aura: dependency resource="c:accountList"/>
</aura: component>
B. </aura: application> Caura : application access="GLOBAL">
<aura dependency resource="c:accountList"/>
</aura: component>

C. </aura: application> Caura: component access="GLOBAL" extends="ltngi outApp">


<aura dependency resource="c:accountList" />
</aura: component>

D. <aura: component access="GLOBAL">


<aura:dependency resource="c:accountList" />
</aura: component>
Ans - A
-----------------------------------------------------------------------------------
-------------
11. 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?

A. A Visualforce page in Salesforce Classic and a Lightning component in Lightning


Experience
B. A Lightning component in Salesforce Classic and a Lightning component in
Lightning Experience
C. A Lightning page in Salesforce Classic and a Visualforce page in Lightning
Experience
D. A Visualforce page in Salesforce Classic and a Lightning page in Lightning
Experience
Ans- A
--------------------------------------------------------------------------------
12. What are three capabilities of the <itng: require> tag when loading JavaScript
resources in Aura components?
Choose 3 answers
A. Loading externally hosted scripts
B. Loading files from Documents
C. Specifying loading order
D. Loading scripts ir parallel
E. One-time loading for duplicate scripts
Ans - C,D,E

-----------------------------------------------------------------------------------
13. What is a benefit of developing applications in a multi-tenant environment?

A. Access to predefined computing resources


B. Unlimited processing power and memory
C. Enforced best practices for development
D. Default out-of-the-box configuration
ans - A
------------------------------------------------------------------------------
14. - 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?

A. Direct Lookup
B. Lookup
C. Indirect Lookup
D. Number with External ID
Ans - D
------------------------------------------------------------------------------
16. 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. Use @TestVisible to allow the test method to see the standard price book.
B. Use @isTest(SeeAlldata=true) and delete the existing standard price book.
C. Use Test.loadData() and a static resource to load a standard price book.
D. Use Test.getStandardpricebookId() to get the standard price book ID.
Ans - D
--------------------------------------------------------------------------------
17. A developer wants to retrieve the Contacts and Users with the email address
devouc.com.
Which SOSL statement should the developer use?

A. FIND Dmail IN Contact, User FOR (dev2uc.com)


B. FIND (Email = 'devue.com') RETURNING Contact (Email), User (Email)
C. FIND (Email = 'devauc.com') IN Contact, User
D. FIND (devue.com) IN Email Fields RETURNING Contact (Email), User (Email)
Ans - D
-------------------------------------------------------------------------------
18. Universal Containers (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 add to create the most efficient model that
supports the business need?

A. Add a lookup field on the Account object to the Global Address object.
B. Add a master-detail field on the Global Address object to the Account object.
C. Add a lookup field on the Global Address object to the Account object.
D. Add a master-detail field on the Account object to the Global Address object.
Ans - A
-----------------------------------------------------------------------------------
--------
19. A custom Object__c has 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?

A. SELECT ID, (SELECT Id FROM Trainers_e) FROM Gym_e WHERE Name - 'Viridian city
Gym'
B. SELECT ID, (SELECT ID FROM Trainers_r) FROM Gym_c MERE Nane - "Viridian city
Gym'
C. SELECT ID FRON Trainer__c THERE Gym_r.Name = 'Viridian city Gym'
D. SELECT id, (SELECT IS FROM Trainer_c) FROM Gym_C WHERE Name = 'Viridian City
Gym'
ans - D
-----------------------------------------------------------------------------------
---------------
22. Which scenario is valid for execution by unit tests?

A. Set the created date of a record using a system method.


B. Generate a Visualforce PDF with getContentAPD()
C. Execute anonymous Apex as a different user.
D. Load data from a remote site with a callout.
Ans - C
--------------------------------------------------------
28. 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. The Account object is included on a workflow on the Vendor object.


B. The Vendor records have existing values in the Account object.
C. The Vendor object must use a master-detail field for reporting.
D. The Account records contain Vendor roll-up summary fields.
Ans - D
--------------------------------------------------------------------
30. What are three characteristics of change set deployments?
Choose 3 answers
A. Change sets can only be used between related organizations.
B. Change sets can be used to transfer records.
C. Change sets can deploy custom settings data.
D. Deployment is done in a one-way, single transaction.
E. Sending a change set between two orgs requires a deployment connection.
Ans - A,D,E
-----------------------------------------------------------------------------
32. A developer wrote Apex code that calls out to an external system.
How should a developer write the test to provide test coverage?
A. O Write a class that implements HTTPCalloutMock.
B. Write a class that extends WebserviceMock.
C. Write a class that extends HTPCalloutMock.
D. Write a class that implements Webservicelock.
Ans - A
-------------------------------------------------------------------------------
34. 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. Use Deploy from the VSCode IDE to deploy an 'insert Contact' Apex class.
B. Use the New button on the Salesforce Contacts Tab to create a new Contact
record.
c. Use the Test menu on the Developer Console to run all test classes for the
Contact trigger.
D. Use the Open Execute Anonymous feature on the Developer Console to run an
'insert Contact' DML statement.
Ans - C
-----------------------------------------------------------------------------------
--
35. Which three resources in an Aura Component can contain JavaScript functions?
Choose 3 answers
A. Helper
B. Style
C. Renderer
D. Design
E. Controller
Ans - A,C,E
------------------------------------------------------------------------
36. If Apex code executes the execute() method of an Apex class when implementing
the Batchable iterface, which two statements are
true regarding governor limits?
Choose 2 answers
A. The Apex governor limits are reset for each iteration of the execute () method.
B. The Apex governor limits might be higher due to the asynchronous nature of the
transaction.
C. The Apex governor limits are omitted while calling the constructor of the Apex
class.
D. The Apex governor limits cannot be exceeded due to the asynchronous nature of
the transaction.
Ans- A,B
-----------------------------------------------------------------------------
37. 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, Bodylat, and its
method, calculateBodyFas (). 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?

A. Declare the class and method using the public access modifier
B. Declare the class and method using the global access modifier.
C. Declare the class as global and use the public access modifier on the method.
D. Declare the class as public and use the global access modifier on the method.
Ans-- B
-----------------------------------------------------------------------------------
--------------
38. Which code in a Visualforce page and/or controller might present a security
vulnerability?

A <apex:outputText value="[!SCurrentPage.parameters.userInput)" />


B. <apex: outputText escape ="false" value="[!
$CurrentPage.parameters.userInput" />
C. <apex:outputField escape="false" value="{$otrl.userInput)" />
D. <apex outputPield value="[!etri.userInput)" />
Ans - B
-------------------------------------------------------------------
39. When a user edits the Postal Code on an Account, a custom Account text field
named "Timezone" must be updated based on the values in a Postal Code ZoZimezone_
custom object.
How can a developer implement this feature?

A. Build an account approval process.


B. Build a flow with Flow Builder.
C. Build an account assignment rule.
D. Build a workflow rule.
--------------------------------------------------------------------------------
40. Which statement should be used to allow some of the records in a list of
records to be inserted if others fail to be inserted?
A. insert records
B. Database.insert (records, true)
C. insert (records, false)
D. Database.insert (records, false)
Ans - D
----------------------------------------------------------------------------
41. Universal Containers wants to notify an external system,in the event that an
unhandled exception occurs by publishing a custom event
using apex
What is the appropriate publish/subscribe logic to meet this requirement?
A. Have the external system subscnbe to the event channel. No publishing is
necessary.
B. Publish the error event using the Eventbu.publish() method and have the external
system subscribe to the event using Comet.
C. Publish the error event using the addError() method and write a trigger to
subscribe to the event and notify the external system.
D. Publish the error event using the addrror() method and have the external system
subscribe to the event using Comet.
Ans - B
----------------------------------------------------------------------------------
43. What are three ways for a developer to execute tests in an org?
Choose 3 answers
A. Tooling API
B. Bulk API
C. Metadata API
D. Setup Menu
E. SalesforceDX
Ans- A,C,D
--------------------------------------------------------------------------------
47. Which action causes a before trigger to fire by default for Accounts?

A. Importing data using the Data Loader and the Bulk API
B. Converting Leads to Contacts
C. Renaming or replacing picklists
D. Updating addresses using the Mass Address update tool
Ans - A
--------------------------------------------------------------------
49. Which action causes a before trigger to fire by default for Accounts?
A. Importing data using the Data Loader and the Bulk API
B. Converting Leads to Contacts
C. Renaming or replacing picklists
D. Updating addresses using the Mass Address update tool
Ans - B,C,D
-----------------------------------------------------------------------------
50. What should a developer do to check the code coverage of a class after running
all tests?
A. Select and run the class on the Apex Test Execution page in the Developer
Console.
B. View the Class Test Percentage tab on the Apex Class list view in Salesforce
Setup.
C. View the code coverage percentage for the class using the Overall Code Coverage
panel in the Developer Console Tests tab.
D. View the Code Coverage column in the list view on the Apex Classes page.
Ans - A
---------------------------------------------------------------------------------
51. A developer created a new trigger that inserts a Task when a new Lead is
created. After deploying to production, an outside integration that reads task
records is periodically reporting errors.

Which change should the developer make to ensure the integration is not affected
with minimal impact to business logic?

A. Deactivate the trigger before the integration runs.


B. Remove the Apex class from the integration user's profile.
C. Use a try-catch block after the insert statement.
D. Use the Database method with allorNone set to false,
Ans - D
-----------------------------------------------------------------------------------
---
53. A Primaryid_e custom field exists on the candidate_c custom object. The field
is used to store each candidate's id number and is marked as
Unique in the schema definition.
As part of a data enrichment process, Universal Containers has a CSV file that
contains updated data for all candidates
in the system. The file contains each Candidate's primary id as a data point.
Universal Containers wants to upload this information into Salesforce,
while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?

A. Upload the CSV into a custom object related to Candidate_c.


B. Create a before insert trigger to correctly map the records.
C. Create a Process Builder on the Candidate_c object to map the records.
D. Update the primaryid__c field definition to mark it as an External Id.
Ans - D
-------------------------------------------------------------------------------
54. When using Salesforce DX, what does a developer need to enable to create and
manage scratch orgs?
A. Sandbox
B. Production
C. Environment Hub
D. Dev Hub
Ans - D
------------------------------------------------------------------------------
56. A developer wants to mark each Account in a List Account> as either Active or
inactive based on the Last ModifiedDate field value being more than 90 days.

Which Apex technique should the developer use?


A. A for loop, with an if-else statement inside
B. A switch statement, with a fer loop inside
C. An if-else statement, with a for loop inside
D. A for loop, with a switch statement inside
Ans - A
-----------------------------------------------------------------------------------
-
59. 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?

A. Data Import Wizard can not import all 500 records.


B. Data Loader automatically relates Opportunities to Accounts.
C Data Import Wizard does not support Opportunities.
D. Data Loader runs from the developer's browser.
Ans - C
-----------------------------------------------------------------------------------
-
62. An Approval process is defined in the Expense_Item__c object. A business rule
dictables that whenever a user changes the status to
'Submitted' on an Expense_Report_c record, all the Expense_Item_c records related
to the expense report must enter the approval process individually.

Which approach should be used to ensure the business requirement is met?

A. Create a Process Builder on Expenne_Report_c with an 'Apex' action type to


submit all related Expense_Item_c records when the criteria is met.
B. Create two Process Builders, one on Expense_Report_e to mark the related
Expense_Item_cas submittable and the second on Expense_Item_e to submit the records
for approval.
C. Create a Process Builder on Expense_Report_e with a 'Submit for Approval action
type to submit all related Expense_Item_ records when the criteria is met
D. Create a Process Builder on Expense_Report_e to mark the related Expense_Item_e
as submittable and a trigger on Expense_item_e to submit the records for approval.
ans - C
-----------------------------------------------------------------------------------
----------------------------------------------------

You might also like