• Mike Roditis
  • 0 Points
  • Member since 2022

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
Kindly anyone can help on below 4 questions for PD:
thanks in advance

1. 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. Lookup
B. Direct Lookup
C. Number with External ID – is this the correct answer?
D. Indirect Lookup

2. A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?

A. use Test.loadData() and reference a CSV file.
B. use SOQL to query the org for the required data.
C. use Test.loadData() and reference a static resource. – is this the correct answer?
D. use Anonymous Apex to create the required data.

3. Which code in a Visualforce page and/or controller might present a security vulnerability?
 A. <apex:outputField value="{!ctrl.userInput}" />

 B. <apex:outputText escape="false" value=" {!$CurrentPage.parameters.userInput}" />

 C. <apex:outputText value="{!£CurrentPage.parameters.userInput}" />   -- is this the correct answer?

 D. <apex:outputField escape="false" value="{!ctrl.userInput}" />

4. A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?
A. @InvocableMethod
     global static ListRecommendation getLevel(List<ContactWrapper> input)
B. @InvocableMethod
     global static List<List<Recommendation>> getLevel(List<ContactWrapper> input)
     {/*implementation*/}      - Is this the correct answer?
C. @InvocableMethod
     global List<List<Recommendation>> getLevel(List<ContactWrapper> input)
D. @InvocableMethod
     global Recommendation getLevel(ContactWrapper input)

4.  A developer created this Apex trigger that calls
MyClass .myStaticMethod: trigger myTrigger on Contact(before insert) ( MyClass.myStaticMethod(trigger.new, trigger.oldMap); }

The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exist?

 A. The deployment fails because the Apex trigger has no code coverage. –is this the right answer becuz the test method did not cover the trigger?
 B. The deployment fails because no assertions were made in the test method.
 C. The deployment passes because the Apex code has required (>75%) code coverage.
 D. The deployment passes because both classes and the trigger were included in the deployment.
  • March 25, 2020
  • Like
  • 1