PD1 Set4
PD1 Set4
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>
-----------------------------------------------------------------------------------
10. Which Lightning code segment should be written to declare dependencies on a
Lightning component, c:accountList, that is used in a Visualforce page?
-----------------------------------------------------------------------------------
13. What is a benefit of developing applications in a multi-tenant environment?
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. 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. 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. 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?