Platform Developer ll - My Deck Flashcards

1
Q

A developer needs to create a service that will process an email sent to it and create an account and
contact using the contents of the email as data for the records.
How might a developer accomplish this requirement?
Choose 1 answer.
A. Use the Apex Inbound Email Handler.
B. Use the Fuel API with Email Data Extensions.
C. Use Heroku Data Clips to Process Email.
D. Use Auto-launched Flow and Process Builder.

A

A. Use the Apex Inbound Email Handler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can Apex be used with Visual Workflow?
Choose 1 answer.
A. To set the version of a Flow being run.
B. To start a Flow automatically.
C. To add custom styling to a Flow.
D. To control access to a Flow.

A

B. To start a Flow automatically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An integration user makes a successful login() call via the SOAP API.
What can be used in the SOAP header to provide server authorization for subsequent API requests?
Choose 1 answer.
A. Named Credentials
B. Session ID
C. OAuth access token
D. Security token

A

B. Session ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A customer has a single Visualforce page that allows each user to input up to 1500 sales forecasts and
instantly view pivoted forecast calculations. Users are complaining that the page is loading slowly, and
they are seeing error messages regarding heap and view state limits.
What is recommended to optimize page performance?
Choose 3 answers.
A. Segregate calculation functionality from input functionality.
B. Specify the list of sales forecasts as transient.
C. Implement pagination and reduce records per page.
D. Create formula fields to compute pivoted forecast calculations.
E. Use JavaScript Remoting instead of controller actions.

A

A. Segregate calculation functionality from input functionality.
C. Implement pagination and reduce records per page.
E. Use JavaScript Remoting instead of controller actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A developer is creating unit tests for code that makes SOAP web service callouts. The developer needs
to insert some test data as a part of the unit tests setup.
How should the developer enable this functionality?
Choose 3 answers.
A. Surround the callout with Test.startTest(), Test.stopTest().
B. Surround the data insertion with Test.startTest(), Test.stopTest().
C. Implement the WebServiceMock interface.
D. Update code to call Test.setMock().
E. Implement the HttpCalloutMock interface.

A

A. Surround the callout with Test.startTest(), Test.stopTest().
C. Implement the WebServiceMock interface.
D. Update code to call Test.setMock().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the main differences between a Developer and a Developer Pro Sandbox?
Choose 2 answers.
A. Size - 200 MB for a Developer Sandbox, 1 GB for a Developer Pro Sandbox.
B. Refresh Interval - 1 day for a Developer Sandbox, 5 days for a Developer Pro Sandbox.
C. Templates and Sampling - No for a Developer Sandbox, yes for a Developer Pro.
D. Bundled Developer Sandboxes - N/A for a Developer Sandbox, 5 for a Developer Pro Sandbox

A

A. Size - 200 MB for a Developer Sandbox, 1 GB for a Developer Pro Sandbox.
D. Bundled Developer Sandboxes - N/A for a Developer Sandbox, 5 for a Developer Pro Sandbox

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following statements are true?
Choose 2 answers.
A. The refresh interval for a Partial Copy Sandbox is 5 days and the refresh interval for a Full Copy Sandbox is 29 days.
B. A Full Sandbox supports both Templates and Sampling.
C. A Developer Pro Sandbox copies data.
D. A Full Sandbox has 15 Bundled Developer Sandboxes.

A

A. The refresh interval for a Partial Copy Sandbox is 5 days and the refresh interval for a Full Copy Sandbox is 29 days.
D. A Full Sandbox has 15 Bundled Developer Sandboxes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True/False: Sandbox Templates are only available in Partial Copy and Full Sandboxes.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
It is recommended to load a small set of representative data into Developer and Developer Pro Sandboxes for testing. Which tools can be used for this purpose?
Choose 2 ansers.
A. Sandbox template editor.
B. Data Sampling
C. Data Loader 
D. Force.com Bulk API
A

C. Data Loader

D. Force.com Bulk API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which of the following statements are true when refreshing a Sandbox?
Choose 3 answers.
A. All licenses are copied from Production.
B. Email delivery defaults to off.
C. Unit tests fail when Messaging.sendEmail throws exceptions.
D. All configuration and customization done in the Sandbox is still there.

A

A. All licenses are copied from Production.
B. Email delivery defaults to off.
C. Unit tests fail when Messaging.sendEmail throws exceptions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

True/False: All things configured or customized in Salesforce are available through the Metadata API as XML files.

A

False.

- There are unsupported metadata types that will need to be done manually in each org.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which of the following can be tracked through the Setup Audit Trail?
Choose 3 answers.
A. Which Fields where created in the last 90 days.
B. Who deleted a certain class.
C. How many licenses have been freed up over the last 90 days.
D. The names of the Approval Processes created in the last 6 months.

A

B. Who deleted a certain class.
C. How many licenses have been freed up over the last 90 days.
D. The names of the Approval Processes created in the last 6 months.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

True/False: If you migrate changes that have newer components to an organization that hasn’t been upgraded to support them, the deployment fails.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Change Sets are best used for:
Choose 2 answers.
A. Straight Sandbox to Production deployments.
B. Repetitive Deployments using the same parameters.
C. Large deployments with a lot of setup changes.
D. Change management without using a local file system.

A

A. Straight Sandbox to Production deployments

D. Change management without using a local file system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following statements are true about Change Sets?
Choose 3 answers.
A. Metadata can only move between the Sandboxes and Production.
B. Components can be deployed with a Change Set, but not deleted.
C. Because Change Sets are cloud-based, they’re not ideal when used with a source control system.
D. Change Sets are the preferred solution for Deployments.

A

A. Metadata can only move between the Sandboxes and Production.
B. Components can be deployed with a Change Set, but not deleted.
C. Because Change Sets are cloud-based, they’re not ideal when used with a source control system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

True/False: Quick Deploy can only be used for Metadata API components.

A

False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Quick deployments are available when which of the following requirements are met?
Choose 3 answers.
A. The components have been validated successfully for the target environment within the last four days (96 hours). As part of the validation, Apex tests in the target org have passed.
B. The components have been validated successfully for the target environment within the last day (24 hours). As part of the validation, Apex tests in the target org have passed.
C. If all tests in the org or all local tests are run, overall code coverage is at least 75%, and Apex triggers have some coverage.
D. If specific tests are run with the Run specified tests test level, each class and trigger that was deployed is covered by at least 75% individually.

A
A. The components have been validated successfully for the target environment within the last four days (96 hours). As part of the validation, Apex tests in the target org have passed.
C. If all tests in the org or all local tests are run, overall code coverage is at least 75%, and Apex triggers have some coverage.
D. If specific tests are run with the Run specified tests test level, each class and trigger that was deployed is covered by at least 75% individually.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Link the following Types of Asynchronous Apex:
1. Future Methods
2. Batch Apex
3. Queueable Apex
4. Scheduled Apex
To its definition:
A. Run large jobs that would exceed normal processing limits.
B. Schedule Apex to run at a specific time.
C. Run in their own thread, and do not start until resources are available.
D. Similar to Future Apex, but provide additional job chaining and allow more complex data types to be used.

A
  1. Future Methods - C. Run in their own thread, and do not start until resources are available.
  2. Batch Apex - A. Run large jobs that would exceed normal processing limits.
  3. Queueable Apex - D. Similar to Future Apex, but provide additional job chaining and allow more complex data types to be used.
  4. Scheduled Apex - B. Schedule Apex to run at a specific time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Link the following Types of Asynchronous Apex:
1. Future Methods
2. Batch Apex
3. Queueable Apex
4. Scheduled Apex
To its Common Scenario:
A. Daily or weekly tasks.
B. Performing sequential processing operations with external Web services.
C. Web service callout.
D. Data cleansing or achieving of records.

A
  1. Future Methods - C. Web service callout.
  2. Batch Apex - D. Data cleansing or achieving of records.
  3. Queueable Apex - B. Performing sequential processing operations with external Web services.
  4. Scheduled Apex - A. Daily or weekly tasks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

True/False: The number of SOQL queries allowed under the governor limits are tripled for asynchronous Apex from 100 to 300.

A

False.

- They are doubled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

True/False: Governor limits for asynchronous calls are independent of the limits in the synchronous request that queued the asynchronous request initially.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Which of the following statements are True for Future Methods?
Choose 3 answers.
A. Future methods are commonly used for making callouts to external webservices.
B. When making a callout in a Trigger it is unnecessary to use a Future or Queueable method.
C. Future Methods must be static void methods.
D. The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types. Future methods can’t take standard or custom objects as arguments.

A

A. Future methods are commonly used for making callouts to external webservices.
C. Future Methods must be static void methods.
D. The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types. Future methods can’t take standard or custom objects as arguments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

True/False: callout in a trigger would hold the database connection open for the lifetime of the callout and that is a “no-no” in a multitenant environment.

A

True.

24
Q

True/False: Future methods are not guaranteed to execute in the same order as they are called. If you need this type of functionality then Queueable Apex might be a better solution.

A

True.

- Watch out for nasty runtime errors if two Future Methods are updating the same record.

25
Q

What is wrong with the following syntax:
@future (callout=true)
public void sendSMSAsync(String from, String to, sObject Account){
// more code
}
Choose 2 answers:
A. Future Methods must be static.
B. Future Methods must only use primitive data types, no objects.
C. It should be @Future instead of @future.
D. Future Methods must return a boolean.

A

A. Future Methods must be static.

B. Future Methods must only use primitive data types, no objects.

26
Q

True/False: To test future methods, enclose your test code between the startTest and stopTest test methods. The system collects all asynchronous calls made after the startTest. When stopTest is executed, all these collected asynchronous processes are then run synchronously.

A

True

27
Q
Which is true for the mock callout class needed to test Future Method callouts?
Choose 3 answers.
A. The mock class must be a @isTest class.
B. The mock class must implement HttpCalloutMock.
C. The mock class must have a method that returns HttpResponce with the needed data and that takes a HttpRequest as parameter.
D. The mock class must be Protected.
A
A. The mock class must be a @isTest class.
B. The mock class must implement HttpCalloutMock.
C. The mock class must have a method that returns HttpResponce with the needed data and that takes a HttpRequest as parameter.
28
Q
True/False: The syntax for setting a mock class for callouts in a test method is:
Test.setMock(ClassName.class, new ClassName());
A

True.

29
Q

What is true for Future Methods:
Choose 2 answers.
A. Future methods can’t be used in Visualforce controllers in getMethodName(), setMethodName(), nor in the constructor.
B. You can’t call a future method from a future method. Nor can you invoke a trigger that calls a future method while running a future method.
C. The getContent() and getContentAsPDF() methods can be used in methods with the future annotation.
D. You’re limited to 100 future calls per Apex invocation.

A

A. Future methods can’t be used in Visualforce controllers in getMethodName(), setMethodName(), nor in the constructor.
B. You can’t call a future method from a future method. Nor can you invoke a trigger that calls a future method while running a future method.

  • The getContent() and getContentAsPDF() methods can’t be used in methods with the future annotation.
  • You’re limited to 50 future calls per Apex invocation, and there’s an additional limit on the number of calls in a 24-hour period. For more information on limits, see the link below.
30
Q

Each time a Batch Class is invoked, the job is placed on the Apex job queue and is executed as a discrete transaction. What advantages does a discrete transaction have?
Choose 2 answers.
A. Every transaction starts with a new set of governor limits, making it easier to ensure that your code stays within the governor execution limits.
B. If one batch fails to process successfully, all other successful batch transactions aren’t rolled back.
C. Discrete transactions have higher governor limits than any other type of Asynchronous Apex.
D. Discrete transactions have higher execution limits than any other type of Asynchronous Apex.

A

A. Every transaction starts with a new set of governor limits, making it easier to ensure that your code stays within the governor execution limits.
B. If one batch fails to process successfully, all other successful batch transactions aren’t rolled back.

31
Q

What is true for Batch Apex?
Choose 2 answers.
A. A Batch Apex class must be global and implement Database.Batchable
B. The Batch Apex start() is called once and always returns an Iterable.
C. The default batch size of data passed to the execute() is 500 records at a time.
D. Batches of records are not guaranteed to execute in the order they are received from the start() method.

A
A. A Batch Apex class must be global and implement Database.Batchable
D. Batches of records are not guaranteed to execute in the order they are received from the start() method. 
  • start() is called once and returns a sObject or an Iterable (in special cases)
  • Default Batch size is 200 records.
32
Q

What is false for Batch Apex?
Choose 1 answer.
A. You can query up to 50 million records with the QueryLocator object from the start() method.
B. You can query up to 50 million records with the Iterable from the start() method.
C. The execute() method takes a reference to the Database.BatchableContext object and a list of sObjects as parameters.
D. The finish() method is generally used for post-processing and is called once after all batches are processed.

A

B. You can query up to 50 million records with the Iterable from the start() method IS FALSE.
- An Iterable enforces the governor limit for the total number of records retrieved by SOQL - 50.000

33
Q

How is a Batch class invoked?
Choose 1 answer.
A. Instantiate the class myBatchObject and then call Database.execute(myBatchObject)
B. Simply call Database.execute(MyBatchClass)
C. Instantiate the class myBatchObject and then call myBatchObject.execute
D. Instantiate the class myBatchObject and then call myBatchObject.Database.execute

A

A. Instantiate the class myBatchObject and then call Database.execute(myBatchObject)

34
Q

What is true for invoking a Batch class?
Choose 3 answers.
A. Database.execute(myBatchObject) returns the Id for the Batch job.
B. Optionally Database.execute() takes a second scope parameter to specify the number of records that should be passed into the execute method for each batch.
C. Each batch Apex invocation creates an AsyncApexJob record so that you can track the job’s progress.
D. The only way to see Batch jobs are through the Apex Job Queue in Setup.

A

A. Database.execute(myBatchObject) returns the Id for the Batch job.
B. Optionally Database.execute() takes a second scope parameter to specify the number of records that should be passed into the execute method for each batch.
C. Each batch Apex invocation creates an AsyncApexJob record so that you can track the job’s progress.

  • Jobs can be retrieved with SOQL using the Id fr the Batch Job.
35
Q

What is true for Batch Apex and state?
Choose 2 answers.
A. Batch Apex is typically stateful.
B. If you specify Database.Stateful in the class definition, you can maintain state across all transactions.
C. Only instance member variables retain their values between transactions in Stateful Apex.
D. Both instance variables and method variables retain their values between transactions in Stateful Apex.

A
B. If you specify Database.Stateful in the class definition, you can maintain state across all transactions.
C. Only instance member variables retain their values between transactions in Stateful Apex.
  • Batch Apex is typically stateless
36
Q

True/False: The number of records inserted must be less than the batch size of 200 because test methods can execute only one batch total.

A

True.

37
Q

Which of the following advantages does Queueable Apex have over Future Apex?
Choose 3 Answers.
A. Increased Governor and Execution limits.
B. Queueable Apex can take non-primitive types: Such as sObjects or custom Apex types.
C. Monitoring: When you submit your job by invoking the System.enqueueJob method, the method returns the ID of the AsyncApexJob record.
D. Chaining jobs: You can chain one job to another job by starting a second job from a running job.

A

B. Queueable Apex can take non-primitive types: Such as sObjects or custom Apex types.
C. Monitoring: When you submit your job by invoking the System.enqueueJob method, the method returns the ID of the AsyncApexJob record.
D. Chaining jobs: You can chain one job to another job by starting a second job from a running job.

38
Q

True/False: Because queueable methods are functionally equivalent to future methods, most of the time you’ll probably want to use queueable instead of future methods.

A

True

- This is not the case when your functionality is sometimes executed synchronously, and sometimes asynchronously.

39
Q

Which is true for Queueable Apex?
Choose 3 answers.
A. To use Queueable Apex implement the Queueable Interface, which has on method called execute.
B. Queueable methods are limited to primitive data types (or arrays or collections of primitives)
C. To add a Queueable class to the job queue, instantiate the Queueable class and call ID jobId = System.enqueueJob(myQueueableJob).
D. You can use the job ID to monitor progress, either through the Apex Jobs page or programmatically by queryingAsyncApexJob.

A

A. To use Queueable Apex implement the Queueable Interface, which has on method called execute.
C. To add a Queueable class to the job queue, instantiate the Queueable class and call ID jobId = System.enqueueJob(myQueueableJob).
D. You can use the job ID to monitor progress, either through the Apex Jobs page or programmatically by queryingAsyncApexJob.

40
Q

What is true for Chaining Jobs using Queueable Apex?
Choose 3 answers.
A. You can add only one job from an executing job, which means that only one child job can exist for each parent job.
B. The execution of a queued job counts once against the shared limit for asynchronous Apex method executions.
C. You can add up to 50 jobs to the queue with System.enqueueJob in a single transaction.
D. No limit is enforced on the depth of chained jobs in any production or Sandbox environment, which means that you can chain one job to another job and repeat this process with each new child job to link it to a new child job.

A

A. You can add only one job from an executing job, which means that only one child job can exist for each parent job.
B. The execution of a queued job counts once against the shared limit for asynchronous Apex method executions.
C. You can add up to 50 jobs to the queue with System.enqueueJob in a single transaction.

  • For Developer Edition and Trial orgs, the maximum stack depth for chained jobs is 5, which means that you can chain jobs four times and the maximum number of jobs in the chain is 5, including the initial parent queueable job.
41
Q
What is false for Scheduled Apex?
Choose 1 answers.
A. The Apex Scheduler lets you delay execution so that you can run Apex classes at a specified time. This is ideal for daily or weekly maintenance tasks using Batch Apex.
B. The class implements the Schedulable interface and must implement the only method that this interface contains, which is the schedule method.
C. To invoke Apex classes to run at specific times, first implement the Schedulable interface for the class. Then, schedule an instance of the class to run at a specific time using the System.schedule method.
D. The parameter of this method is a SchedulableContext object. After a class has been scheduled, a CronTrigger object is created that represents the scheduled job. It provides a getTriggerId method that returns the ID of a CronTriggerAPI object.
A

B. The class implements the Schedulable interface and must implement the only method that this interface contains, which is the schedule method.

  • The method is called execute.
42
Q

True/False: After you implement a class with the Schedulable interface, use the System.Schedule method to execute it. TheSystem.Schedule method uses the user’s timezone for the basis of all schedules, but runs in system mode—all classes are executed, whether or not the user has permission to execute the class.

A

True.

43
Q

True/False: The System.Schedule method takes two arguments: a CRON expression used to represent the time and date the job is scheduled to run, and the name of the class.

A

False.
- It takes three arguments: a name for the job, a CRON expression used to represent the time and date the job is scheduled to run, and the name of the class.

44
Q

What is True for Scheduled Apex?
A. You can only have 100 scheduled Apex jobs at one time and there are maximum number of scheduled Apexexecutions per a 24-hour period.
B. Scheduled Apex can only be run programmatically.
C. Use extreme care if you’re planning to schedule a class from a trigger. You must be able to guarantee that the trigger won’t add more scheduled jobs than the limit.
D. Synchronous Web service callouts are not supported from scheduled Apex. To be able to make callouts, make an asynchronous callout by placing the callout in a method annotated with @future(callout=true) and call this method from scheduled Apex. However, if your scheduled Apex executes a batch job, callouts are supported from the batch class.

A
A. You can only have 100 scheduled Apex jobs at one time and there are maximum number of scheduled.
C. Use extreme care if you’re planning to schedule a class from a trigger. You must be able to guarantee that the trigger won’t add more scheduled jobs than the limit.
D. Synchronous Web service callouts are not supported from scheduled Apex. To be able to make callouts, make an asynchronous callout by placing the callout in a method annotated with @future(callout=true) and call this method from scheduled Apex. However, if your scheduled Apex executes a batch job, callouts are supported from the batch class.
  • You can also schedule Apex from the UI.
45
Q

What is False for the Flex Queue?
A. Future Jobs can be seen in the Flex Queue like any other async job.
B. Apex Flex queue enables you to submit up to 100 batch jobs for execution. Any jobs that are submitted for execution are in holding status and are placed in the Apex Flex queue. Up to 100 batch jobs can be in the holding status.
C. Jobs are processed first-in first-out—in the order in which they’re submitted. You can look at the current queue order and shuffle the queue
D. The system can process up to five queued or active jobs simultaneously for each organization. The status of these moved jobs changes from Holding to Queued.

A

A. Future Jobs can be seen in the Flex Queue like any other async job

46
Q

What is True for Apex REST Callouts?
Choose 3 answers.
A. REST Callouts consists of a HTTP method (Like GET) a URI (the endpoint address) and other optional properties.
B. When the server processes the request, it sends a status code in the response (Like 200 for success)
C. A request can contain headers that provide more information about the request, such as the content type.
D. We should only use REST Apex when SOAP Apex is impossible.

A

A. REST Callouts consists of a HTTP method (Like GET) a URI (the endpoint address) and other optional properties.
B. When the server processes the request, it sends a status code in the response (Like 200 for success)
C. A request can contain headers that provide more information about the request, such as the content type.

47
Q

True/False: Apex test methods don’t support callouts, and tests that perform callouts fail, instead you have to mock the callout.

A
True.
- A Callout Mock can be created as both a Static Resource that is then called by the test class or as a test class that implements the HttpCalloutMock interface.
48
Q

True/False: WSDL2Apex automatically generates Apex classes from a WSDL document. You download the web service’s WSDL file, and then you upload the WSDL and WSDL2Apex generates the Apex classes for you. The Apex classes construct the SOAP XML, transmit the data, and parse the response XML into Apex objects

A

True.

49
Q

True/False: As you know; to deploy or package Apex code, at least 75% of that code must have test coverage. This coverage does not include classes generated by WSDL2Apex.

A

False.

50
Q

True/False: When you create an Apex class from a WSDL, the methods in the autogenerated class call WebServiceCallout.invoke, which performs the callout to the external service. When testing these methods, you can instruct the Apex runtime to generate a fake response whenever WebServiceCallout.invoke is called by implementing the WebServiceMock interface and specify a fake response for the testing runtime to send.

A

True.
- Instruct the Apex runtime to send this fake response by calling Test.setMock in your test method. For the first argument, pass WebServiceMock.class. For the second argument, pass a new instance of your WebServiceMockinterface implementation.

51
Q

What is True for Apex REST Webservices.
Choose 3 answers.
A. Classes must be global, methods must be global static and be annotated with an HTTP method like @HttpGet.
B. Classes must be annotated with a REST ressource - @RestResource(urlMapping=’/Account).
C. The URL mapping is case-insensitive and can’t contain a wildcard character (*).
D. The base endpoint for Apex REST is https://instance.salesforce.com/services/apexrest/.

A

A. Classes must be global, methods must be global static and be annotated with an HTTP method like @HttpGet.
B. Classes must be annotated with a REST ressource - @RestResource(urlMapping=’/Account).
D. The base endpoint for Apex REST is https://instance.salesforce.com/services/apexrest/.

  • The URL mapping is case-sensitive and can contain a wildcard character (). i.e. @RestResource(urlMapping=’/Account/).
52
Q
Each exposed method in an Apex REST Web Service must be defined as global static and add an annotation to associate it with an HTTP method. Link the following @HttpMethods:
1. @HttpGet
2. @HttpPost
3. @HttpDelete
4. @HttpPut
5. @HttpPatch
To its definition:
A. Typically used to update fields in existing records.
B. Reads or retrieves records.
C. Creates records.
D. Deletes records.
E. Typically used to update existing records or create records
A
  1. @HttpGet - B. Reads or retrieves records.
  2. @HttpPost - C. Creates records.
  3. @HttpDelete - D. Deletes records.
  4. @HttpPut - E. Typically used to update existing records or create records
  5. @HttpPatch - A. Typically used to update fields in existing records.
  • You can use each annotation only once in each Apex class.
53
Q

True/False: To expose a class as a SOAP Web Service: Define your class as global. Add the webservice keyword and the static definition modifier to each method you want to expose. The webservice keyword provides global access to the method it is added to.

A

True.

54
Q

What does the following query return?
Choose 1 answer.
SELECT Name, customfield__c, (SELECT OldValue, NewValue FROM foo__history) FROM foo__c
A. Returns every history row for Foo__c and displays the name and custom fields of Foo.
B. Returns every Foo object row together with the corresponding history rows in nested subqueries.
C. The query is invalid.

A

B. Returns every Foo object row together with the corresponding history rows in nested subqueries.

55
Q

Which of the following statements about convertCurrency() in SOQL are True:
Choose 2 answers.
A. convertCurrency(field) in the SELECT statement of a SOQL query converts currency fields to the user’s currency.
B. FORMAT(field) in the SELECT statement of a SOQL query converts currency fields to the user’s currency.
C. It is possible to use convertCurrency in a WHERE clause or in collaboration with ORDER BY.
D. You can’t convert the result of an aggregate function into the user’s currency by calling the convertCurrency() function.

A

A. convertCurrency(field) in the SELECT statement of a SOQL query converts currency fields to the user’s currency.
D. You can’t convert the result of an aggregate function into the user’s currency by calling the convertCurrency() function.

  • Format() is valid and formats the currency to the users local.