Metadata API (10% Weighting) Flashcards

Given a scenario, describe the capabilities, limitations, and considerations when using the Metadata API for deployment

1
Q

What are the two of the easiest tools to access the functionality in Metadata API?

A

Force.com IDE or Ant Migration Tool

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

Name 4 examples of how you can use the Metadata API to manage setup and customization information for your orgs

A
  1. Export the customization in your organization as XML metadata files
  2. Migrate configuration changes between organizations
  3. Modify existing customization in your organization using XML metadata files
  4. Manage customization in your organization programmatically
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which editions support the Metadata Api?

A

Enterprise, Unlimited, Performance or Developer

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

What does the Modify Metadata Through Metadata API functions permission provide?

A

You can update metadata (including Apex) through Metadata API even if you don’t have the Modify All Data permission

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

Which MetaData API operations are used for File-Based Development?

A

deploy()

retrieve()

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

Which 3 specifications do Metadata API comply with?

A

SOAP (Simple Object Access Protocol) 1.1

WSDL (Web Service Description Language) 1.1

WS-I Basic Profile 1.1

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

What two metadata types are supported by Apex Metadata API (as of the current release)?

A

Page Layouts

Records of custom metadata types

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

Is deleting metadata supported by the Apex Metadata API?

A

No

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

Is reading, creating and updating metadata supported by the Apex Metadata API?

A

Yes

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

You’ve developed a new feature that includes several new custom metadata types. Your admins need to install and configure your feature in multiple orgs. How can you ease the work for your admins?

A) Write an Apex post install script that makes the metadata updates

B) Write careful instructions on how to make the necessary changes in Setup

C) Create a custom setup wizard to simplify the configuration

D) Send them a lovely fruit basket

E) A and C( and D couldn’t hurt)

A

E) A and C( and D couldn’t hurt)

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

Apex Metadata API works with which of the following metadata types?

A) All metadata types

B) Page layouts and records of custom metadata types

C) Page layouts and list views

D) Custom metadata types

A

B) Page layouts and records of custom metadata types

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

Which of the following is not supported by Apex Metadata API?

A) Creating metadata

B) Reading metadata

C) Updating metadata

D) Deleting metadata

A

D) Deleting metadata

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

Scenario: You have 10 orgs and you use managed packages to update the orgs. If you add a custom field for accounts and you want it to show up on the page layouts in all your orgs (without creating repetitive work in the Setup UI for the admins), what can you do?

A

Use Apex to retrieve the existing metadata for the Account page layout and update it with the new field. Then create an apex post install script that deploys the metadata update

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

Which of the following can you test?

A) The state of the org after you’ve deployed metadata into it

B) The structure of the deployment container

C) The behavior of your callback

D) A and C

E) B and C

A

E) B and C

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

How should you test a metadata deployment request?

A) Exercise your code to build a deployment request, and verify it’s structure

B) Exercise your code to build a deployment request, and enqueue the deployment

C) Add assert statements to your callback

D) All of the above

A

A) Exercise your code to build a deployment request, and verify it’s structure

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

Apex Metadata API relies on asynchronous deployment. What implications does this have?

A) You can use it to toggle features on and off for unit testing

B) You can test callbacks by executing the deployment and waiting for the callback

C) You must test callbacks directly, outside of the deployment process

D) You can rely on operations happening in order

A

C) You must test callbacks directly, outside of the deployment process

17
Q

How does Salesforce ensure that Apex Metadata API is a trusted interface?

A

By

  • Restricting the types of metadata that can be modified
  • Controlling the types of packages that have access to metadata
18
Q

When a managed package uses Apex Metadata API to create metadata records in a subscriber org, which namespace is the metadata created in?

A) The namespace of the managed Package

B) The namespace of the subscriber org

C) A new namespace that you designate

A

B) The namespace of the subscriber org

19
Q

Apex Metadata API allows managed packages to create which of the following elements?

A) Apex classes

B) Visualforce pages

C) Automatic code generators

D) Page Layouts

A

D) Page Layouts

20
Q

Enabling the Deploy Metadata Apex setting allows which kind of packages to make changes in an org?

A) Certified managed packages

B) Uncertified managed packages

C) Unmanaged packages

D) Packages containing permission sets

A

B) Uncertified managed packages

21
Q

What is the Ant Migration Tool (also known as the Force.com Migration tool)

A

A Java/Ant-based command-line utility for moving metadata between a local directory and a Salesforce org.

22
Q

Name some scenarios where the Ant Migration Tool can be used for

A
  • Development projects where you need to populate a test environment with a lot of setu pchanges
  • Multistage release processes
  • Repetitive deployment using the same parameters
  • When migration from stage to production is done by IT
  • Scheduling batch deployments
23
Q

What is a possible issue when retrieving custom fields on standard objects through the Ant Migration Tool?

A

When you use the wildcard symbol in package.xml to retrieve all objects, you will not retrieve standard objects, or custom fields on standard objects

24
Q

What is a possible issue when retrieving profiles or permissions sets and field-level security when using the Ant Migration Tool?

A

The contents of a retrieved profile or permission set depend on the other contents of the retrieve request. For example, field-level security for fields included in custom objects are returned at the same time as profiles or permission sets

25
Q

Which metadata components are dependent on a particular object for their definition and would require dot-qualifying of the component name with the object name in package.xml?

A
CustomField
Picklist
RecordType
Weblink
Validation Rule
26
Q

How can you specify to run local tests in a deployment and to exclude managed package tests (while using the Metadata API)?

A

set testLevel on the DeployOptions object to TestLevel.RunLocalTests. Next pass this object as an argument to the deploy() call

27
Q

Are metadata components based on sObjects?

A

No, they are based on metadata types, such as ApexClass and CustomObject, which extend Metadata, the base class for all metadata types.

28
Q

What is a component in the metadata API?

A

A component is an instance of a metadata type?

For example, CustomObject is a metadata type for custom objects, and the MyCustomObject__c component is an instance of a custom object.

29
Q

If you have apex jobs pending or in progress, can you deploy the apex classes or triggers via the Metadata API?

A

No, you need to cancel the apex jobs before deploying the changes.

You also need to enable deployments with apex jobs in the Salesforce user interface in the deployment settings page

30
Q

When deploying custom fields through the metadata API, what is the editable and readable fields set to?

A

False. To override the default values, include field permissions for the new field in your profiles

31
Q

What happens when you deploy a picklist field in a target org but it doesn’t contain all the values that exist in the target org?

A

The values that are not included in the metadata is set to inactive