[Aug-2024] Get 100% Real Free Salesforce PDI PDI Sample Questions [Q78-Q97]

Share

[Aug-2024] Get 100% Real Free Salesforce PDI PDI Sample Questions

Accurate PDI Questions with Free and Fast Updates

NEW QUESTION # 78
Assuming that 'name; is a String obtained by an <apex:inputText> tag on a Visualforce page.
Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers

  • A. String query ='SELECT Id FROM Account WHERE Name LIKE \''%' + name.noQuotes() + '%\''; List<Account> results = Database.query(query);
  • B. String query = '%' + name + '%';
    List<Account> results = [SELECT Id FROM Account WHERE Name LIKE :query];
  • C. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name + '%\''; List<Account> results = Database.query(query);
  • D. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' +
    String.escapeSingleQuotes(name) + '%\'';
    List<Account> results= Database.query(query);

Answer: B,D


NEW QUESTION # 79
What si the debug output of the following apex code? Decimal thevalue; system.debug(thevalue);

  • A. Undefined
  • B. 0.0
  • C. Null
  • D. 0

Answer: C


NEW QUESTION # 80
A custom exception "RecordNotFoundException" is defined by the following code of block.public class RecordNotFoundException extends Exception()which statement can a developer use to throw a custom exception?choose 2 answers

  • A. Throw RecordNotFoundException();
  • B. throw RecordNotFoundException("problem occured");
  • C. Throw new RecordNotFoundException("problem occured");
  • D. Throw new RecordNotFoundException();

Answer: C,D


NEW QUESTION # 81
Einstein Next Best Action Is configured at Universal Containers to display recommendations to internal users on the Account detail page.
If the recommendation is approved, a new opportunity record and task should be generated. If the recommendation is rejected, an Apex method must be executed to perform a callout to an external system.
Which three factors should a developer keep Hi mind when implementing the Apex method?
Choose 3 answers

  • A. The method must use the @invocableMethod annotation.
  • B. The method must use the @AuraEnabled annotation.
  • C. The method must be defined as static.
  • D. The method must be defined as public.
  • E. The method must use the @Future annotation.

Answer: C,D,E


NEW QUESTION # 82
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 does not support Opportunities.
  • B. Data Loader runs from the developer's browser.
  • C. Data Import Wizard can not import all 500 records.
  • D. Data Loader automatically relates Opportunities to Accounts.

Answer: A


NEW QUESTION # 83
A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?

  • A. Disable the trigger m production and test to see If the issue still occurs.
  • B. Review the Historical Event logs to Identify the source of the issue.
  • C. Use the Apex Interactive Debugger to step through the code and Identify the issue.
  • D. Add system.debug statements to the code to track the execution flow and identify the issue.

Answer: D


NEW QUESTION # 84
Which two describe Heroku Redis? Choose 2 answers.

  • A. Is an in-memory key-value data store, run by Heroku.
  • B. Is a repository for storing large images.
  • C. Is provisioned and managed as an add-on.
  • D. Is an option for long-term data storage.

Answer: A,C


NEW QUESTION # 85
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=false).
  • B. Add static to the server-side method signature.
  • C. A Decorate the server-side method with (static=true).
  • D. Change the function signature to be private static.

Answer: C


NEW QUESTION # 86
A 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

  • A. Use the final keyword and assign its value when declaring the variable.
  • B. Use the static keyword and assign its value in a static initializer.
  • C. Use the final keyword and assign its value in the class constructor.
  • D. Use the static keyword and assign its value in the class constructor.

Answer: A,B


NEW QUESTION # 87
A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override. What is the correct implementation of the ShippingCalculator class?

  • A. Public abstract class ShippingCalculator {
    public override calculate() { /*implementation*/ }
    }
  • B. Public abstract class ShippingCalculator {
    public virtual void calculate() { /*implementation*/ }
    }
  • C. Public abstract class ShippingCalculator {
    public void calculate() { /*implementation*/ }
    }
  • D. Public abstract class ShippingCalculator {
    public abstract calculate() { /*implementation*/ }
    }

Answer: B

Explanation:
the extending class can override the existing virtual methods by using the override keyword in the method definition. Overriding a virtual method allows you to provide a different implementation for an existing method Reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_extending.htm


NEW QUESTION # 88
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. What step should the developer take to resolve the issue and properly test the exception?

  • A. Use database methods with all or none set to FALSE.
  • B. Use try/catch within the unit test to catch the exception.
  • C. Use Test.isRunningTest() within the customer controller.
  • D. Use the finally block within the unit test to populate the exception.

Answer: B


NEW QUESTION # 89
An sObject named Application_c has a lookup relationship to another sObject named Position_c. Both Application _c and Position_c have a picklist field named Status_c.When the Status_c field on Position_c is updated, the Status_c field on Application_c needs to be populated automatically with the same value, and execute a workflow rule on Application_c.How can a developer accomplish this?

  • A. By configuring a cross-object field update with a workflow.
  • B. By changing Application_c.Status_c into a roll -up summary field.
  • C. By changing Application_c.Status_c into a formula field.
  • D. By using an Apex trigger with a DML operation.

Answer: D


NEW QUESTION # 90
What should a developer do to check the code coverage of a class after running all tests?

  • A. view the overall Code Coverage panel of the tab in the Developer Console.
  • B. Select and run the class on the Apex Test Execution page
  • C. View the Code Coverage column in the view on the Apex Classes page.
  • D. View the Class test Coverage tab on the Apex Class record.

Answer: A


NEW QUESTION # 91
In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?

  • A. On the Paused Row Interviews related List for a given record
  • B. In the Paused Interviews section of the Apex Flex Queue
  • C. On the Paused Row Interviews component on the Home page
  • D. In the system debug log by Altering on Paused Row Interview

Answer: B


NEW QUESTION # 92
Which exception type cannot be caught?

  • A.
  • B.
  • C.
  • D.

Answer: B


NEW QUESTION # 93
Which annotation exposes an Apex class as a RESTful web service?

  • A. ©Remote Action
  • B. ©Httplnvocable
  • C. ©AuraEnabled
  • D. ©RestResource

Answer: C


NEW QUESTION # 94
What are three characteristics of change set deployments?
Choose 3 answers

  • A. Sending a change set between two orgs requires a deployment connection.
  • B. Deployment is done in a one-way, single transaction.
  • C. Change sets can deploy custom settings data.
  • D. Change sets can only be used between related organizations.
  • E. Change sets can be used to transfer records.

Answer: B,D,E


NEW QUESTION # 95
A developer created this Apex trigger that calls MyClass,myStartmethod:

The developer creates a test method that calls MyClase,myStartmethod directly, resulting in 81% overall code coverage.
What happens wtier the developer tries to deploy the ... and two classes to production, assuming no other code exists?

  • A. The deployment passes became the Apex code has the requited 75% code coverage.
  • B. The deployment passes because both classes and the trigger were included ki the deployment.
  • C. The deployment fails because the Apr- MgQM has no code coverage.
  • D. The deployment tails because no assertions mett made in the lest method.

Answer: C


NEW QUESTION # 96
A 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?

  • A. Rates.smokercharge
  • B. Rates.getsmokercharge()
  • C. Contacttrigger.insurancerates.smokercharge
  • D. Insurancerates.smokercharge

Answer: D


NEW QUESTION # 97
......

PDI Study Guide Realistic Verified Dumps: https://www.troytecdumps.com/PDI-troytec-exam-dumps.html

Self-Study Guide for Becoming an Platform Developer I (PDI) Expert: https://drive.google.com/open?id=1gwLnZDI9XnuRuDlagZBey4IS49uyiz4q