CRT-450 Practice Test

CRT-450 Practice Test practice questions, page 10 of 18, with answer review and explanations.

Question 46

A developer executes the following query in Apex to retrieve a list of contacts for each account: List accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account] ; Which two exceptions may occur when it executes? (Choose two.)

  1. CPU limit exception due to the complexity of the query.
  2. SOQL query row limit exception due to the number of contacts.
  3. SOQL query limit exception due to the number of contacts.
  4. SOQL query row limit exception due to the number of accounts.

Question 47

Which three tools can deploy metadata to production? (Choose three.)

  1. Change Set from Developer Org
  2. Force.com IDE
  3. Data Loader
  4. Change Set from Sandbox
  5. Metadata API

Question 48

A developer needs to display all of the available fields for an object. In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? (Choose two.)

  1. Use myObject.sObjectType.getDescribe().fieldSet() to return a set of fields.
  2. Use mySObject.myObject.fields.getMap() to return a map of fields.
  3. Use Schema.describeSObjects(new String[]{myObject})[0].fields.getMap() to return a map of fields.
  4. Use getGlobalDescribe().get(myObject).getDescribe().fields.getMap() to return a map of fields.

Question 49

How should a developer avoid hitting the governor limits in test methods?

  1. Use @TestVisible on methods that create records.
  2. Use Test.loadData() to load data from a static resource.
  3. Use @IsTest (SeeAllData=true) to use existing data.
  4. Use Test.startTest() to reset governor limits.

Question 50

Which three declarative fields are correctly mapped to variable types in Apex? (Choose three.)

  1. Number maps to Decimal.
  2. Number maps to Integer.
  3. TextArea maps to List of type String.
  4. Date/Time maps to Dateline.
  5. Checkbox maps to Boolean.