Salesforce Platform App Builder Practice Test!

55 Questions | Total Attempts: 1223

SettingsSettingsSettings
Please wait...
Salesforce Developer Quizzes & Trivia

.


Questions and Answers
  • 1. 
    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. 

  • 2. 
    Public String getStringMethodl(){ return myString; } public String getStringMethod2() { if (myString == null) myString = 'Method2’; } return myString; } {'myString}, OStringMethod1), OStringMethod2), (!myString) What does the user see when accessing the custom page? 
    • A. 

      GetMyString,,,

    • B. 

      ,, Method2,

    • C. 

      „ Method2, getMyString

    • D. 

      GetMyString„ Method2, getMyString

  • 3. 
    What is an accurate constructor for a custom controller named "MyController"? 
    • A. 

      Public MyController() { account a = new Account(); }

    • B. 

      Public MyController(SObject obj) {account a = (Account) obj;}

    • C. 

      Public MyController(List objects) { accounts = (List)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 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. 

      Database.insert(propertiesToCreate,System.ALLOW_PARTIAL);

    • B. 

      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 extends the functionality of a standard or custom controller

    • C. 

      It allows pages to perform mass updates of records.

    • D. 

      It allows pages to perform pagination with 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. 

      Better performance for custom Salesforce Mobile apps.

    • B. 

      Better integration with Force.com sites.

    • C. 

      More pre-bulk components to replicate the Salesforce look and feel.

    • D. 

      More centralized control via server-side logic.

  • 9. 
    Which data type or collection of data types can SOQL statements populate or evaluate to? Choose 3 answers 
    • A. 

      Boolean

    • B. 

      Integer

    • C. 

      List of sObjects

    • D. 

      Single sObject

    • E. 

      String

  • 10. 
    Which type of information is provided by the Checkpoints tab in the Developer Console? Choose 2 answers 
    • A. 

      Exception

    • B. 

      Debug Statement

    • C. 

      Namespace

    • D. 

      Time

  • 11. 
    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

  • 12. 
    • A. 

      ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));

    • B. 

      ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);

    • C. 

      ApexPages.StandardController controller = new ApexPages.StandardController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));

    • D. 

      ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);

  • 13. 
    • 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.

  • 14. 
    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.

    • D. 

      To modify the page layout settings for a custom object.

  • 15. 
    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. 
    • A. 

      By using documents.

    • B. 

      By using HttpCalloutMocks.

    • C. 

      By using Static Resources.

    • D. 

      By using WebServiceTests.

  • 16. 
    • 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

  • 17. 
    • 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.

    • D. 

      By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.

  • 18. 
    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. 

      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.

    • D. 

      Create a lookup relationship in the Applications custom object to the Job Postings custom object.

  • 19. 
    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.

  • 20. 
    • A. 

      101

    • B. 

      100

    • C. 

      102

    • D. 

      252

  • 21. 
    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.

  • 22. 
    • A. 

      Before Trigger execution

    • B. 

      After Committing to database

    • C. 

      Before committing to database.

    • D. 

      After Trigger execution

  • 23. 
    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

  • 24. 
    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)

  • 25. 
    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.