PD1 Flashcards
what are the methods used to show input in classic and lightning ?
Use visualforce page in classic and lightning component in lightning
A recursive transaction is limited by a DML statement creating records for these two objects:
1. Accounts
2. Contacts
The Account trigger hits a stack depth of 16.
Which statement is true regarding the outcome of the transaction?
A. The transaction fails only if the Contact trigger stack depth is greater or equalto 16.
B. The transaction succeeds as long as the Contact trigger stack depth is less than 16.
C. The transaction succeeds and all the changes are committed to the database.
D. The transaction fails and all the changes are rolled back.
C. The transaction succeeds and all the changes are committed to the database.
A developer needs to prevent the creation of request records when certain conditions exist in the system. A RequestLogic class exists to checks the conditions. What is the correct implementation? A. Trigger RequestTrigger on Request (before insert) { RequestLogic.validateRecords {trigger.new}; }
B. Trigger RequestTrigger on Request (before insert) {
if (RequestLogic.isvalid{Request})
Request.addError {‘Your request cannot be created at this time.’};
}
C. Trigger RequestTrigger on Request (after insert) {
if (RequestLogic.isValid{Request})
Request.addError {‘Yourrequest cannot be created at this time.’};
}
D. Trigger RequestTrigger on Request (after insert) {
RequestLogic.validateRecords {trigger.new};
}
A. Trigger RequestTrigger on Request (before insert) {
RequestLogic.validateRecords {trigger.new};
}
Which standard field is required when creating a newcontact record?
A. Name
B. AccountId
C. FirstName
D. LastName
D. LastName
Which two events need to happen when deploying to a production org? Choose 2 answers
A. All triggers must have at least 1% test coverage.
B. All test and triggers must have at least 75% test coverage combined
C. All triggers must have at least 75% test coverage.
D. All Apex code must have at least 75% test coverage.
A. All triggers must have at least 1% test coverage.
D. All Apex code must have at least 75% test coverage.
When importing and exporting data into Salesforce, whichtwo statements are true?
Choose 2 answers
A. Bulk API can be used to bypass the storage limits when importing large data volumes indevelopment environments.
B. Bulk API can be used to import large data volumes in development environments without bypassing the storage limits.
C. Data import wizard is a client application provided by Salesforce.
D. Developer and Developer Pro sandboxes have different storage limits.
C. Data import wizard is a client application provided by Salesforce.
D. Developer and Developer Pro sandboxes have different storage limits.
What are three characteristics of change set deployments? (Choose three.)
A. They require a deployment connection.
B. They can be used to transfer records.
C. They can be used only between related organizations.
D. They can be used to deploy custom settings data.
E. They use an all or none deployment model.
A. They require a deployment connection.
C. They can be used only between related organizations.
E. They use an all or none deployment model.
An org has an existing Visual Flow that creates an Opportunity with an Update Records element. A developer must update the Visual Flow to also create a
Contact and store the created Contact’s ID on the Opportunity.
Which update should the developer make in the Visual Flow?
A. Add a new Create Records element.
B. Add a new Quick Action (of type Create) element.
C. Add a new Update Records element.
D. Add a new Get Records element.
A. Add a new Create Records element.
What is an example of a polymorphic lookup field in Salesforce?
A. The WhatId field on the standard Event object
B. The ParentId field on the standard Account object
C. A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign
D. The LeadId and ContactId fields on the standard Campaign Member object
Hide Solution
D. The LeadId and ContactId fields on the standard Campaign Member object
Hide Solution
A developer needs to create a custom Interface in Apex.
Which three considerations must the developer keep in mind while developing the Apex Interface’ Choose 3 answers
A. New methods can be added to a public interface within a released package.
B. A method defined In an Apex Interface cannot have an access modifier.
C. A method implementation can be defined within the Apex Interface.
D. The Apex interface class access modifier can be set to Private, Public, or Global.
E. The Apex class must be declared using the interface keyword.
B. A method defined In an Apex Interface cannot have an access modifier. C. A method implementation can be defined within the Apex Interface. E. The Apex class must be declared using the interface keyword.
Which three resources in an Azure Component can contain JavaScript functions?
A. Renderer
B. Controllers
C. Design
D. helper
E. Style
A. Renderer
B. Controllers
D. helper
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?
A. @AuraEnabled(cacheable=false)
public static List search(String term) { /implementation/ }
B. @AuraEnabled(cacheable=false)
public List search(String term) {/implementation/ }
C. @AuraEnabled(cacheable=true) publicList search(String term) { /*implementation*/ }
D. @AuraEnabled(cacheable=true)
public static List search(String term) { /* implementation*/ }
D. @AuraEnabled(cacheable=true)
public static List search(String term) { /* implementation*/ }
While writing a test class that coversan OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org.
How should the Developer overcome this problem?
A. Use Test.getStandardPricebookId() to get the standard PriceBook ID.
B. Use Test.loadData() and a Static Resource to load a standard Pricebook.
C. Use @TestVisible to allow the test method to see the standard PriceBook.
D. Use @IsTest(SeeAllData=true) and delete the existing standard PriceBook.
A. Use Test.getStandardPricebookId() to get the standard PriceBook ID.
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 discussion, the UC administrator tried to change the Master-Detail relationshipto 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 Account records contain Vendor roll-up summary fields.
D. The Vendor object must use a Master-Detail field for reporting.
C. The Account records contain Vendor roll-up summary fields.
A Salesforce developer wants to review their code changesimmediately and does not want to install anything on their computer or on the org.
Which tool is best suited?
A. Setup Menu
B. Developer Console
C. Salesforce Extension for VSCode
D. Third-party apps from App Exchange
B. Developer Console
Where are two locations a developer can look to find information about the status of asynchronous or future cals? Choose 2 answers
A. Paused Flow Interviews component
B. Apex Jobs
C. Apex Flex Queue
D. Time-Based Workflow Monitor
B. Apex Jobs
C. Apex Flex Queue
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizardaccepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.
Which three statements are useful inside the unit test to effectively test the custom controller?
Choose 3 answers
A. insert pageRef.
B. Test.setCurrentPage(pageRef);
C. public ExtendedController(ApexPages StandardController cntrl) { }
D. String nextPage - controller.save().getUrl();
E. ApexPages.CurrentPage().getParameters().put(‘input', ‘TestValue’);
B. Test.setCurrentPage(pageRef);
D. String nextPage - controller.save().getUrl();
E. ApexPages.CurrentPage().getParameters().put(‘input', ‘TestValue’);
What are two ways for a developer to execute tests in an org?
A. Matadata API
B. Bulk API
C. Developer console
D. Tooling API
C. Developer console
D. Tooling API
Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order will be imported into Salesforce.
A. Indirect Lookup
B. Lookup
C. Direct Lookup
D. Number with External ID
D. Number with External ID
What should be used to create scratch orgs?
A. Developer Console
B. Salesforce CLI
C. Sandbox refresh
D. Workbench
B. Salesforce CLI
Which two are phases in the Salesforce Application Event propagation framework? Choose
2 answers
A. Bubble
B. Capture
C. Default
B. Capture
C. Default
A developer must create a CreditcardPayment class that provides an implementation of an existing Payment class. Public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementation*/ } } Which is the correct implementation? A. Public class CreditCardPayment extends Payment { public virtual void makePayment(Decimal amount) { /*implementation*/ } }
B. Public class CreditCardPayment implements Payment { public override void makePayment(Decimal amount) { /*Implementation*/ } }
C. Public class CreditCardPayment implements Payment { public virtual void makePayment(Decimal amount) { /*implementation*/ } }
D. Public class CreditcardPayment extends Payment { public override void makePayment(Decimal amount) { /*implementation*/ } }
D. Public class CreditcardPayment extends Payment { public override void makePayment(Decimal amount) { /*implementation*/ } }
Which code displays the content of Visualforce page as PDF?
A.
B.
C.
D.
D.
A developer is creating a test coveragefor a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class? A. @PreTest
B. @TestSetup
C. @isTest(SeeAllData=True)
D. @BeforeTest
B. @TestSetup