This page was exported from Exams Labs Braindumps [ http://blog.examslabs.com ] Export date:Thu Nov 21 10:44:30 2024 / +0000 GMT ___________________________________________________ Title: PDI Practice Test Questions Answers Updated 268 Questions [Q20-Q43] --------------------------------------------------- PDI Practice Test Questions Answers Updated 268 Questions PDI dumps & Salesforce PDI Sure Practice with 268 Questions NEW QUESTION 20Which statement would a developer use when creating test data for products and pricebooks?  Id pricebookId = Test.getStandardPricebookId();  Pricebook pb = new Pricebook();  IsTest(SeeAllData = false);  List objList = Test.loadData(Account.sObjectType, ‘myResource’); NEW QUESTION 21Refer to the following code that runs in an Execute Anonymous block:  In an environment where the full result set is returned, what is a possible outcome of this code?  The total number of records processed as a result of DML statements will be exceeded  The total number of records processed as a result of DML statements will be exceeded.  The transaction will succeed and the first ten thousand records will be committed to the database.  The total numberof DML statements will be exceeded. NEW QUESTION 22A developer is implementing an Apex class for a financial system. Within the class, the variables ‘creditAmount’ and ‘debtAmount’ should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers  Use the static keyword and assign its value in the class constructor.  Use the final keyword and assign its value in the class constructor.  Use the static keyword and assign its value in a static initializer.  Use the final keyword and assign its value when declaring the variable. NEW QUESTION 23A Salesforce Administrator used Flow Builder to create a flow named ”accountOnboarding”. The flow must be used inside an Aura component.Which tag should a developer use to display the flow in the component?  Lightning-flow  Aura:flow  Lightning:flow  Aura:flow NEW QUESTION 24Universal Container(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 ad to create the most efficient model that supports the business need?  Add a Master-Detail field on the Account object to the Global Address object  Add a Master-Detail field on the Global Address object to the Account object.  Add a Lookup field on the Account object to the Global Address object.  Add a Lookup field on the Global Address object to the Account object NEW QUESTION 25To which primitive data type in Apex is a currency field atomically assigned?  Integer  Decimal  Double  Currency NEW QUESTION 26A developer creates a custom controller and a custom Visualforce page by using the code block below:public class MyController {public String myString {get {if (myString == null) { myString = ‘a’;}return myString;} private set; } public string getMyString (){return ‘getMyString’;} public string getStringMethod () {if (myString == null) {myString = ‘b’;} return myString;}} <apex:page controller = “MyController”> {!StringMethod}, {!myString}, {!myString} </apex:page> What can the user expect to see when accessing the custom page?  A, a, a  B, b, b  A, b, getMyString  B, a, getMyString NEW QUESTION 27A developer wants to store a description of a product that can be entered on separate lines by a user during product setup and later displayed on a Visualforce page for shoppers. Which field type should the developer choose to ensure that the description will be searchable in the custom Apex SOQL queries that are written?  Text Area (Rich)  Text Area (Long)  Text  Text Area NEW QUESTION 28Universal Container use a simple order Management app. On the Order Lines, the order line total is calculated by multiplying the item price with the quantity ordered. There is a Master-Detail relationship between the Order and the Order Lines object.What is the practice to get the sum of all order line totals on the order header?  Roll-Up Summary Field  Apex Trigger  Process Builder  Declarative Roll-Up Summaries App NEW QUESTION 29A developer has the following class and trigger code:public class InsuranceRates { public static final Decimal smokerCharge = 0.01; } trigger ContactTrigger on Contact (before insert) { InsuranceRates rates = new InsuranceRates(); Decimal baseCost = XXX; } Which code segment should a developer insert at the XXX to set the baseCost variable to the value of the class variable smokerCharge?  Rates.smokerCharge  Rates.getSmokerCharge()  ContactTrigger.InsuranceRates.smokerCharge  InsuranceRates.smokerCharge NEW QUESTION 30A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? (Choose 2)  Use Schema.PicklistEntry returned by Case.Status.getDescribe().getPicklistValues().  Use Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos().  Use SOQL to query Case records in the org to get all the RecordType values available for Case.  Use SOQL to query case records in the org to get all values for the Status picklist field. NEW QUESTION 31A developer is creating a Visualforce page that allows users to create multiple Opportunities. The developer is asked to verify the current user’s default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user’s default record type?  Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.  Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current user’s default record type  Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method.  Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos() to get a list of record types, and iterate trought them until isdefaultRecordTypeMapping() is true. NEW QUESTION 32A developer needs to write a method that searches for a phone number that could be on multiple object types.Which method should the developer use to accomplish this task?  SOQL Query that includes ALL ROWS  SOQL query on each object  SOSL Query that includes ALL ROWS  SOSL query on each object NEW QUESTION 33How does the Lightning Component framework help developers implement solutions faster?  By providing an Agile process with default steps  By providing code review standards and processes  By providing device-awareness for mobile and desktops  By providing change history and version control NEW QUESTION 34Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers  Upload the SVG as a static resource.  Import the static resource and provide a getter for it in JavaScript.  Reference the getter in the HTML template.  Reference the import in the HTML template.  Import the SVG as a content asset file. NEW QUESTION 35Universal Container(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 ad to create the most efficient model that supports the business need?  Add a Master-Detail field on the Account object to the Global Address object  Add a Master-Detail field on the Global Address object to the Account object.  Add a Lookup field on the Account object to the Global Address object.  Add a Lookup field on the Global Address object to the Account object NEW QUESTION 36What should be used to create scratch orgs?  Developer Console  Salesforce CLI  Workbench  Sandbox refresh NEW QUESTION 37The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead is converted.What should be used to ensure that a user populates the Lead Source field prior to converting a Lead?  Process Builder  Validation Rule  Formula Field  workflow Rule NEW QUESTION 38In order to override a standard action with a visualforce page, which attribute must be defined in the<apex:page> tag?  Pagereference  Override  Standardcontroller  Controller NEW QUESTION 39When a user edits the Postal Code on an Account, a custom Account text field named “Timezone” must be update based on the values in a PostalCodeToTimezone__c custom object. How should a developer implement this feature?  Build an Account Assignment Rule.  Build an Account custom Trigger.  Build an account Approval Process  Build an Account Workflow Rule. NEW QUESTION 40In which order does SalesForce execute events upon saving a record?  Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit  Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit  Before Triggers; Validation Rules; After Triggers; Workflow Rules; Assignment Rules; Commit  Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit NEW QUESTION 41The following Apex method is part of the ContactService class that is called from a trigger: public static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit__c = “EMEA” ; update thisContact; } How should the developer modify the code to ensure best practice are met?  Public static void setBusinessUnitToEMEA(List<Contact> contacts){for(Contact thisContact : contacts){thisContact.Business_Unit__c = ‘EMEA’ ;update contacts[0];}}  Public static void setBusinessUnitToEMEA(List<Contact> contacts){for(Contact thisContact : contacts) {thisContact.Business_Unit__c = ‘EMEA’ ;}update contacts;}  Public static void setBusinessUnitToEMEA(Contact thisContact){List<Contact> contacts = new List<Contact>();contacts.add(thisContact.Business_Unit__c = ‘EMEA’);update contacts;}  Public void setBusinessUnitToEMEA(List<Contact> contatcs){contacts[0].Business_Unit__c = ‘EMEA’ ;update contacts[0];} NEW QUESTION 42A developer receives an error when trying to call a global server-side method using the @remoteAction decorator.How can the developer resolve the error?  Change the function signature to be private static.  Add static to the server-side method signature.  A Decorate the server-side method with (static=true).  Decorate the server-side method with (static=false). NEW QUESTION 43Universal 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 relationship to a Lookup relationship but was not able to do so. What is a possible reason that this change was not permitted?  The Account records contain Vendor roll-up summary fields.  The Vendor object must use a Master-Detail field for reporting.  The Vendor records have existing values in the Account object.  The Account object is included on a workflow on the Vendor object.  Loading … New PDI Exam Questions| Real PDI Dumps: https://www.examslabs.com/Salesforce/Salesforce-PDI/best-PDI-exam-dumps.html --------------------------------------------------- Images: https://blog.examslabs.com/wp-content/plugins/watu/loading.gif https://blog.examslabs.com/wp-content/plugins/watu/loading.gif --------------------------------------------------- --------------------------------------------------- Post date: 2022-04-06 03:54:30 Post date GMT: 2022-04-06 03:54:30 Post modified date: 2022-04-06 03:54:30 Post modified date GMT: 2022-04-06 03:54:30