Tuesday, 11 April 2017

Salesforce Platform Developer - I Dumps - Part-1

Salesforce Platform Developer - I Dumps
  1. public String getStringMethodl() return myString;
    public String getStringMethod2() ( if (myString == null) myString = 'Method2*; return myString;
    }
    <apex•page controller="myController "> {'myString}, OStringMethod1), OStringMethod2), (!myString) </apex:page>
    What does the user see when accessing the custom page?
    A)     getMyString,,,
    B)      ,, Method2, Method2
    C)      „ Method2,  getMyString
    D)     getMyString„ Method2, getMyString
  2. What is a valid way of loading external lavascript files nto a Visualforce page? Choose 2 answers
    A. Using a <script> tag.
    B. Using a <link> tag.
     C. using an <apex;define> tag.
    D. using  an <apexanclueScript> tag.
  3. What is an accurate constructor for a custom controller named "MyController"?
    A)     public MyController() { account = new Account();

    B)      public MyController(SObject obj) account = (Account) obj

    C)      public MyController(List<SOblect> objects) { accounts = (List<Account>)objects; 
    D)     public MyController(ApexPages.StandardController stdController) {account = (Account)stdController.getRecord(); 


  4. A developer needs to create records for the object Property c. The developer creates the following code block:
    01 List<Property c> propertiesToCreate = helperClass.createProperties ;
    02 try
    03
     04 ) catch (Exception exp) {
     05 //Exception handling
    06 }
    Which line of code would the developer insert at line 03 to ensure that at least some records are created, even if a f( records have errors and fail to be created?
    A)     0 Database.insert(propertiesToCreate,System.ALLOW_PARTIAL);
    B)      0 insert propertiesToCreate;
    C)      Database.insert(propertiesToCreate,false);
    D)     Databaseinsert(propertiesToCreate);
  5. What is a valid source and destination pair that can send or receive change sets? Choose 2 answers
    A)     Sandbox to production.
    B)      Developer edition to sandbox.
    C)      Developer edition to production.
    D)     Sandbox to sandbox.
  6. What is a capability of a StandardSetController? Choose 2 answers
    A)     It extends the functionality of a standard or custom controller

    B)      It allows pages to perform mass updates of records.

    C)      It allows pages to perform pagination with large record sets.

    D)     It enforces field-level security when reading large record sets.
  7. How can a developer determine, from the DescribeSObjectResult, if the current user will be able to create an object in Apex?
    A)     By using the hasAccess() method.

    B)      By using the isCreatable() method.

    C)      By using the isInsertable() method.

    D)     By using the canCreate() method ! 
  8. What is a benefit of the Lightning Component framework?
    A. 0 Better performance for custom Salesforce M1obile apps.
    B. ® Better integration with Force.com sites.
    C. 0 More pre-bulk components to replicate the Salesforce look and feel.
    D. 0 More centralized control via server-side logic.
  9. In which order does Salesforce execute events upon saving a record?
    A)     Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit

    B)      Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit

    C)      Before Triggers; Validation Rules; Ater Triggers; Workflow Rules; Assignment Rules; Commit

    D)     Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit

  10. Which data type or collection of data types can SOQL statements populate or evaluate to? Choose 3 answers 
    A)     A Boolean 
    B)      An integer
    C)      A list of sObjects
    D)     A single sObject
    E)      A string
  11. Which type of information is provided by the Checkpoints tab in the Developer Console? Choose 2 answers [ Check pd2, we have the same Q and answer there ]
    A)     Exception
    B)      Debug Statement
    C)      Namespace
      D) Time

  12. A developer has a block of code that omits any statements that indicate whether the code block should execute or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the salesforce organization?
    A)     Anonymous Block

    B)      Apex Controllers

    C)      HTTP Callouts
             D) Apex Triggers


  13. Which code block returns the ListView of an Account object using the following debug statement? system. debug (controller . getListViewOptions ;
    A)     ApexPages.StandardSetController controller = new ApexPages.StandardSetController([SELECT Id FROM Account LIMIT 1]);
    B)      ApexPages.StandardController controller = new     ApexPages.StandardController(Database.getQueryLocator(pseleot Id from Account Limit i'))
    C)      ApexPages.StandardController controller = new ApexPages StandardController ( [SELECT Id FROM Account LIMIT 1]);
    D)     ApexPages.StandardSetController controller = new _; ApexPages . StandardSetGontroller (Database . getQueryLocator (' select Id from Account Limit 1’))
  14. How can a developer avoid exceeding governor limits when using an Apex Trigger?  
    choose 2 answers 
    A)     By using a helper class that can be invoked from multiple triggers.
    B)      By using the Database class to handle DML transactions.
    C)      By using Maps to hold data from query results.
    D)     By performing DML transactions on lists of SC.

  15. Which user can edit a record after it has been locked for approval? Choose 2 answers

    A)     An administrator.

    B)      Any user who approved the record previously.
    C)      A user who is assigned as the current approver.
    D)     Any user with a higher role in the hierarchy.
  16.  When can a developer use a custom Visualforce page in a Force.com application? Choose 2 answers
    A)     To create components for dashboards and layouts.
    B)      To deploy components between two organizations.
    C)      To generate a PDF document with application data.
    To modify the page layout settings for a custom object.
  17. What is the capability of the Developer Console?
    A.      0 Execute Anonymous Apex code, Ran REST API, create/EMI Code.

    B.       Execute Anonymous Apex code, create/Edit Code, view Debug Logs.

    C.       Execute Anonymous Apex code, Run REST API, Deploy code changes.

    D.      Execute Anonymous Apex code, create/EMI Code, Deploy code changes.



  18. A developer needs to ensure there is sufficient test coverage for an Apex Method that interacts with Accounts. The R. developer needs to create test data.
    What is the preferred way to load this test data into Salesforce2
    A. 0 By using documents.
     B. 0 By using HttpCalloutMocks.
    C. O By using Static Resources.
     D. 0 By using WebServiceTests
  19. A developer wants to list all of the Tasks for each Account on the Account detail page.  When -p Task is created for a Contact, what does the developer need to do to display the Task on the related Account record?
    A)     Create an Account formula field that displays the Task information.
    B)      Nothing. The Task is automatically displayed on the Account page.
    C)      Create a Workflow Rule to relate the Task to the Contact's Account.
    D)     Nothing. The Task cannot be related to an Account and a Contact

  20. A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?
    A)     By using ApexMessage.Message() to display an error message after the number of DML statements is excel
    B)      By using Messaging.SendEmail() to conthtinue the transaction and send an alert to the user after the number DML statements is exceeded.
    C)      By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
    By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.

  21. A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per job posting. Once an application is submitted for a job posting, that application cannot be modified to be resubmitted to a different job posting.  What can the administrator do to associate an application with each job posting in the schema for the organization?
    A)     Create a lookup relationship on both objects to a junction object called Job Posting Applications.
    B)       B) Create a master-detail relationship in the Job Postings custom object to the Applications custom object.
    C)      Create a master-detail relationship in the Application custom object to the Job Postings custom object.
    Create a lookup relationship in the Applications custom object to the Job Postings custom object.
  22. What is the proper process for an Apex Unit Test?
    A)     Query for test data/using SeeAliData=true. Call the method being tested. Verify that the results are correct.
    B)      Create data for testing. Execute runAllTests(). Verify that the results are correct.
    C)      Create data for testing. Call the method being tested. Verify that the results are correct.
    D)     Query for test data using SeeAllData=true. Execute runAllTests(). Verify that the results are correct.

  23. A developer in a Salesforce org with 100 Accounts executes the following code using the Developer Console: Time Remaining: 52:41 Account r.yAccount = new Account (Name= '14yAccount insert MyAccount;
    For (integer x = 0; x < 150; x++) {
    Account newAccount = new Account (Name= 'MyAccount + x) ; try ( insert newAccount; }
    catch (Exception ex) { System.Debug(ex); }}
    Insert new Account (Name= 'MyAccount' );
    How many accounts are In the org after this code is run?
    A)     101
    B)      100
    C)      102
    D)     252
  24. A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?
          A)     Add the TestVisible attribute to the Apex class.
    B)      Add the SeeAllData attribute to the test methods.
    C)      Add the SeeAllData attribute to the test class.

      D) Add the TestVisible attribute to the Apex methods
  25. A developer wrote a workflow email alert on case creation so that an email is sent to the case owner manager when a case is created. When will the email be sent?
    A)     Before Trigger execution
    B)      After Committing to database.
    C)      Before committing to database.
    D)     After Trigger execution.
  26. Which declarative method helps ensure quality data? Choose 3 answers
    A)     Exception handling
    B)      Workflow alerts
    C)      Validation rules
    D)     Lookup filters
    E)      Page layouts


  27. Which statement would a developer use when creating test data for products and pricebooks?
    A)     List ObjList = Test.loadData(Account.sObjectType,’myresource’)
    B)      PriceBook pb = new PriceBook()
    C)      Id Pricebook Id = Test.getStandardPricebookId();
    D)     IsTest(SeeAllData = false)


  28. What is a good practice for a developer to follow when writing a trigger? Choose 2 answers
    A)     Using the Map data structure to hold query results by ID.
    B)      Using @future methods to perform DML operations.
    C)      Using the set data structure to ensure distinct records.
    D)     Using synchronous callouts to call external systems.
  29. A company wants a recruiting app that models candidates and interviews; displays the total number of interviews each candidate record; and defines security on interview records that is independent from the security on candidates records. What would a developer do to accomplish this task? Choose 2 answers [ Check pd1, we have it there as well ]
    A)     Create a roll-up summary field on the Candidate object that counts Interview records.
    B)      Create a master-detail relationship between the Candidate and Interview objects.
    C)      Create a lookup relationship between the Candidate and Interview objects.
    D)     Create a trigger on the Interview object that updates a field on the Candidate object. You must select exactly 2 responses.

  30. In the Lightning component Framework, Which resource can be used to fire events?  Choose 2 events [ Check pd1, we have it there as well ]
    A)     Visualforce Controller Actions.
    B)      Third-Party web service code
    C)      Third-Party javascript Code.
    D)     Javascript controller Actions.


  31. How would a developer determine if a CustomObject_c record has been manually shared with the current user in Apex ?
    A)     A. 0 By calling the profile settings of the current user.
    B)     B. By querying CustomObject Share.
    C)     C.0 By calling the IsShared() method for the record.
    D)     D.0 By querying the role hierarchy.

  32. which trigger event allows a develop, to update fields in the Trigger.new list without using an additional DML statement? Choose. 2 answers
    A. 0 After insert.
    B. 0 after update.
    C. o Before insert.
    D. Before update.
  33. A developer has the following code. [ Check pd1, we have it there as well ]
    try {List<String> nameList; Account a; String s = a.Name; nameList.add( s );
    } catch ( ListException le ) {
    System.debug("List Exception");
    } catch ( NullPointerException npe ) {
    System_debug("NullPointer Exception");
    } catch ( Exception e ) {
    System.debug("Generic Exception");
    }
    What message would be logged?
    A)     No message is logged
    B)      Generic Exception
    C)      List Exception
    D) NullPointer Exception



  34. A developer needs to know if all tests currently pass in Salesforce environment. Which feature can the developer use? Choose 2 answers
    A)     Developer Console
    B)      ANT Migration Tool
    C)      Salesforce UI Apex Test Execution
    D)     Workbench Meta Data retrieval.

  35. where would a developer build a managed package?
    A)     A. 0 Developer Edition
    B)     B. 0 Developer Sandbox
    C)      C. 0 Partial Copy Sandbox
    D)     D.0 Unlimited Edition


  36. What is the value of x after the code segment executes?
    String x = 'A'; Integer i = 10; if i < 15 ) { i = 15; x = ‘B’;} else if ( i < 20 ) { x = 'C'; } else { x = ;
    }
    A)     B
    B)      C
    C)      D
    D)     A
  37. In a single record, a user selects multiple values from a multi-select  picklist. How are the selected values represented in Apex?
    A)     As a string with each value separated by comma.
    B)      As a list<String> with each value as an element in the list.
    C)      As a string with each value separated by Semicolon.
    D)     As a Set<String> with each value as an element in the list.

  38. In a single record, a user selects multiple values from a multi-select  picklist. How are the selected values represented in Apex?
    A)     As a string with each value separated by comma.
    B)      As a list<String> with each value as an element in the list.
    C)      As a string with each value separated by Semicolon.
    D)     As a Set<String> with each value as an element in the list.

  39. A reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. Which action can a developer take to enforce this requirement?
    A)     Create a required comments field.
    B)      Create a formula field.
    C)      Create a validation rule.
    D)     Create a required Visualforce component.

  40. A developer writes a SOQL Query to find child records for a specific parent. How many levels can be returned in a single query?
    A)     3
    B)      5
    C)      1
    D)     7

  41. A hierarchy custom setting stores a specific URL for each profile in salesforce. Which statement can a developer use to retrieve the correct URL for the current user's profile and display this one Visualforce Page?
    A)     {!$Setup.Uri_Settings_c.Instance[Profile.Id].URL_C}
    B)      {!$Setup.Uri_Settings_c. URL_C}
    C)      {!$Setup.Uri_Settings_c[Profile.Id].URL_C}
    D)     {!$Setup.Uri_Settings_c[$Profile.Id].URL_C}

  42. A Developer wants to create a custom object to track Customer Invoices.
    How Invoices and Accounts should be related to ensure that all Invoices are visible to everyone with access to an Account? [ ANSWER IN PD1 ]
    A)     The Account should have a Lookup relationship to the Invoice.
    B)      The Invoice should have a Master-Detail relationship to the Account.
    C)      The Account should have a Master-Detail relationship to the Invoice.
    D)     The Invoice should have a Lookup relationship to the Account.

  43. Which statement should a developer avoid using inside procedural loops? Choose 2 answers
    A)     System.Debug(‘Amount of CPU time (in MS) used so far: ‘+limits.getCpuTime())
    B)      Update ContactList
    C)      List<Contact> contacts = [Select id,salutation,firstname,lastname,email from contacts where accountid = :a.id
    D)     if(o.accountid == a.id)

  44. A 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 answers
    A)     Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues().
    B)      Use Schema.RecordTypelnfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()
    C)      Use SOQL to query Case records in the org to get all the RecordType values available for Case.
    D)     Use SOQL to query Case records In the org to get all value for the Status pickiest field.
  45. Which statement about change set deployments is accurate? Choose 3 answers
    A)     They can be used only between related organizations.
    B)      They require a deployment connection.
    C)      They use an all or none deployment model.
    D)     They can be used to transfer Contact records.
    E)      They can be used to deploy custom settings data.

  46. A developer is creating an application to track engines and their parts an individual part can be used in different types of engines. What data model should be used to track the data and to prevent orphan records? [ Answer in earlier doc ]
    A)     Create a junction object to relate many engines to many parts through a master-detail relationship.
    B)      Create a master-detail relationship to represent the one-to-many model of engines to parts
    C)      Create a lookup relationship to represent how each part relates to the parent engine object.
    D)     Create a junction object to relate many engines to many parts through a lookup relationship.
  47. When the value of a field in an account record is updated, which method will update the value off custom field related opportunities? Choose 2 answers
    A)     An Apex trigger on the Account object.
    B)      A Process Builder on the Account object.
    C)      A cross-object formula field on the Account object.
    D)     A Workflow Rule on the Account object.

  48. A developer needs to provide a Visualforce page that lets users enter Product-specific details during a Sales cycle. How can this be accomplished? Choose 2 answers
    A)     Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify.
    B)      Create a new Visualforce page and an Apex controller to provide Product data entry.
    C)      Copy the standard page and then make a new Visualforce page for Product data entry.
    D)     Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.
  49. A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account's address using a SOQL query. The page will also allow the user to make edits to the address. Where would the developer write the Account address verification logic?
    A)     In a Controller Extension.
    B)      In a Custom Controller.
    C)      In a Standard Controller.
    D)     In a Standard Extension.

  50. What is a capability of a formula fields? Choose 3 answers
    A)     Display the previous value for a field using the prior value function.
    B)      Return and display a field value from another object using the VLOOKUP function.
    C)      Determine which of three different images to display using the if function.
    D)     Generate a link using the HYPERLINK function to a specific record in a legacy system.
    E)      Determine if a datetime field has passed using the NOW function.

  51. Where can custom roll-up summary fields be created using Standard Object relationships? Choose 3 answers
     A)  On Account using Case records. 
    b)     On Account using Opportunity records.c)      On Opportunity using Opportunity Product records.d)      On Quote using Order records.e)     On Campaign using Campaign Member records.

  52. What is an important consideration when developing in a multi-tenant environment?
    A)     Polyglot persistence provides support for a global, multilingual user base in multiple orgs on multiple instances.
    B)      Governor limits prevent tenants from impacting performance in multiple orgs on the same instance.
    C)      Unique domain names take tile place of namespaces for code developed for multiple orgs on multiple instances.
    D)     Org-wide data security determines whether other tenants can see data in multiple orgs on the same instance.

  53. The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record. What would a developer do to meet this requirement?
    A)     Create a Workflow Rule on the Opportunity object that updates a field on the parent Account.
    B)      B) Create a formula field on the Account object that performs a MAX on the Opportunity Close Date held.
    C)      Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field
    D)     Create a trigger on the Account object that queries the Close Date of the most recent Opportunities

  54. When loading data into an organization, what can a developer do to match records to update existing records? Choose 2 answers
    A)     Match an external Id Text field to a column in the imported file.
    B)      Match the Id field to a column in the imported file.
    C)      Match the Name field to a column in the imported file.
    D)     Match an auto-generated Number field to a column in the imported file. 

  55. A visual force page has a standard controller for an object that has a look up relationship to a parent object. How can a developer display data from the parent record on the page?
    A)     By using SOQL on the visualforce page to query for data from the parent record.
    B)      By using merge field syntax to retrieve data from the parent record.
    C)      By adding a second standard controller to the page for the parent record.
    D)     By using a roll-up formula field on the child record to include data from the parent record.


  56. A developer has the following query: Contact c = [SELECT id, firstname, lastname, email FROM Contact WHERE lastname = 'Smith']; What does the query return if there is no Contact with the last name "Smith"?
    A)     A Contact with empty values.
    B)      A Contact initialized to null.
    C)      An empty List of Contacts.
    D)     An error that no rows are found.

  57. What is an accurate statement about variable scope? Choose 3 answers [ Answer in old pd 1 doc ]
    A)     Sub-blocks cannot reuse a parent block's variable name.
    B)      A variable can be defined at any point in a block.
    C)      Parallel blocks can use the same variable name.
    D)     Sub-blocks can reuse a parent block's variable name if its value is null.
    E)      A static variable can restrict the scope to the current block if its value is null.
  58. What is the minimum log level needed to see user-generated debug statements?
    A)     DEBUG
    B)      FINE
    C)      INFO
    D)     WARN
  59. Which action can a developer perform in a before update trigger? Choose 2 answers
    A) Update the original object using an update DML operation.
    B)  Delete the original object using a delete DML operation.
    C)  Change field values using the Trigger.new context variable.
    D)  Display a custom error message in the application interface.
  60. which statement about change set deployments is accurate? Choose 3 answers
    A. They require a deployment connection
    B.They can be used to transfer contact records.
    C. 0 They use an all or none deployment model.
    D.0 They can be used only between related organizations.
    E. 0 They can be used to deploy custom settings data.



Please comment if any suggestions ! Thank you.