Questions tagged [metadata-api]

Questions about the Metadata API provided by salesforce. The API that can be used to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts, for your organization. This API is intended for managing customizations and for building tools that can manage the metadata model, not the data itself.

311 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
0answers
6k views

SFDX Deploy: Global Value Set Cannot Be Resolved

I am trying to use DX to deploy to a sandbox. It has been a major hassle. At this point the only error I get is this: Global value set 'External_Evaluation_Required__c' in record type 'Exception' ...
7
votes
1answer
104 views

Is there a supported way to get what attributes a lightning component has programmatically?

Is there a supported way to get what attributes a lightning component has programmatically, given its name, that could identify (global) attributes on components from managed packages as well? The ...
6
votes
0answers
454 views

Character encoding difference between source:retrieve vs mdapi:retrieve?

Here is the screenshot of a simple validation rule in Salesforce: and I am now going to retrieve this validation rule using three different options and notice how the ' (apostrophe) is escaped(or ...
6
votes
0answers
121 views

Delete a Managed Object using Tooling or Metadata API when Deletable

Trying to delete a validation rule in subscriber org using either the tooling or metadata API This validation rule WAS part of a managed package but was deleted from the package and new version ...
6
votes
0answers
79 views

how to access patch version in Salesforce managed package post install script

We have been trying to access the salesforce patch version from post install script part of our managed package. System.requestVersion().patch() always returns null. It's mentioned in the SF ...
5
votes
0answers
87 views

How can I find the relationship between MetadataComponentId and the expected name for the Metadata API?

I've been using the Dependency API to try to retrieve all dependencies for a given metadata. I would like to get a list of dependencies, and then retrieve these with the Metadata API. Unfortunately, ...
5
votes
1answer
2k views

How to retrieve connected app using metadata API?

I have created connected App using metadata API,Now I have to retrieve connected App's Information using metadata API,The code is working fine for the Apps which is created manually but not for the ...
5
votes
0answers
1k views

Page layout assignment through the Metadata Api is not properly taking effect

I have a managed package that creates a custom page layout for the contact object, and I am trying to use the Metadata Api to assign this layout to several profiles. This is a sample of what I have ...
5
votes
0answers
197 views

How to tell if a field is not supported in metadata API?

I have the Order Status field in the Order.object file defined simply as follows: <fields> <fullName>Status</fullName> <picklist> <picklistValues> ...
5
votes
1answer
4k views

Deploy/retrieve lightning community page variations with metadata API?

I could not find an answer to this question in the documentation or by looking here. I have built a page variation in my lightning community, and then exported it. I am fine including that in a ...
4
votes
0answers
140 views

How do I query a Connected App's IP Relaxation settings?

Within a connected app's manage settings page (Setup -> Managed Connected Apps, click on the Edit link next to the connected app of interest), you can see and set the OAuth Policies -> IP Relaxation ...
4
votes
1answer
41 views

Destroy PushNotification in CustomApplication with Metadata API

Good morning, I've been trying to delete PushNotification setup for a CustomApplication with the Metadata API (version 46.0 ) but although the answer is successful the changes are not done in my ...
4
votes
0answers
924 views

visualforcePage.getContent() : Maximum redirects (100) exceeded

We are having utility class where we are fetching session Id using visualforcePage.getContent() which we are further using in updating custom metadata records. we released our last version around ...
4
votes
1answer
240 views

Is it possible to deploy delegated custom object adminstration via API / Changeset

A few documents list delegated adminstration as something that cannot be retrieved or deployed via metadata API, including the 'unsupported metadata types' doc However, the metadata api docs list ...
4
votes
0answers
722 views

Is there any way to deploy list views for custom settings through Metadata API?

Currently trying to deploy a list view created for custom settings through the 'Manage' button through the Metadata API. <?xml version="1.0" encoding="UTF-8"?> <CustomObject xmlns="http://...
4
votes
0answers
119 views

Accessing SAML Login Information in Connected App programmatically

I was looking for a way to programmatically read (and potentially - write) data in SAML Login Information (on ConnectedApp 'manage-side' settings), as displayed below: I already tried using Metadata ...
4
votes
1answer
115 views

Data Loading Sequence for Account ParentId

I would like to know the proper data loading sequence. I know to start with Accounts then Contacts and so forth. I used an External_Id__c field for the id pulled from prod. So how do I map the ...
4
votes
0answers
256 views

Profile Login IP Range Description Missing

I am missing the description field from the loginIpRanges for profiles. According to this doc (http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_profile.htm#ProfileLoginIpRange_title) ...
4
votes
0answers
451 views

Can the MetadataService.cls be used to create Workflows via Apex?

I'm trying to use the MetadataService.cls provided by FinancialForce.com to create Workflows. The problem I am having is that the declaration for the "workFlow" class and its related components does ...
3
votes
1answer
767 views

sfdx is removing metadata from permission sets when changing read/write to false

I updated some permissions sets in my package and change some field-level security access to read/write false for some objects. When I run sfdx force:source:pull instead of marking the XML as <...
3
votes
0answers
157 views

Creating a custom ManagedContentType in a SFDX Project

I'm trying to understand the best place in my SFDX project to place the file for a custom ManagedContentType. I tried to place this file in the location force-app\main\default\managedContentTypes/...
3
votes
0answers
244 views

Is it possible to activate specific version of process builder(or flow) through API?

For the situation shown in the above picture, is it possible to activate a specific version of process builder(or flow) through API?
3
votes
0answers
3k views

Deployment error: “invalid cross reference id” / How do I determine which Profiles are referenced in .app metadata files?

I’m attempting to migrate metadata from one org to another using a package. But my mdapi:deploy command keeps failing with “Error test/applications/Underwriting.app Underwriting invalid cross ...
3
votes
0answers
79 views

Standard User with “Modify Metadata” fails to create active Picklist Value

What is failing here perfectly works for a SysAdmin user. I have a StandardUser with a permission set which grants him ModifyMetadata and calling this code creates the Picklist Value but leaves it ...
3
votes
0answers
234 views

Is “Case Record Type” in “Email-to-Case” supported by the metadata API?

In the Salesforce org UI, there is the option of setting the Case Record Type in the Case settings. Here is a screenshot of it being set to the Inquiry Record Type: Is this setting supported by the ...
3
votes
0answers
115 views

Password policies remain after deleting profile?

I deleted a profile via the Metadata API, and it did not delete its associated password policies. I cannot find the policies anywhere in the UI, but when I pull from production (or any sandbox ...
3
votes
0answers
771 views

How to create/update picklist using metadata service api — MetadataService.CustomField deprecated

I am trying to create and update picklist and adding its value dynamically using metadata service api. But I got to know that MetadataService.CustomField.picklist is deprecated and using valueSet ...
3
votes
0answers
679 views

How to retrieve global value set values assigned to Task recordtype through metadata API

How do I, through the metadata, retrieve the picklistvalues assigned to a task recordtype, when the picklist is a global value set? I've tried with the following package.xml, however neither the ...
3
votes
0answers
85 views

Cannot retrieve Layout - Even Thought it is found on List Metadata Query

I can read layouts from any other objects but for some reason I cannot get the layouts from a namespaced object. End point: /services/Soap/m/39.0 The List Reponse: <result> <createdById&...
3
votes
0answers
164 views

Lightning Experience: Can standard Listview Charts be shared and deployed as Metadata?

I've created several Charts in Standard Listviews on Tabs in LEX. So far they work as expected and look like this: Now logging in as an other user I've noticed that the charts are not available. Only ...
3
votes
0answers
1k views

Ant Migration Tool: INVALID_OPERATION - INVALID_OPERATION:Too many files in zip

Now I'm trying to deploy bunch of custom objects to my Developer Org. using Ant Migration Tool. All these custom objects are from our Production org, and the final goal is to setup CI in our ...
3
votes
0answers
411 views

Person Account RecordTypes metadata

I have Person Accounts enabled in my sandbox org. When I pull the (objects/Account.object) metadata in Eclipse I don't see any Person Account record types in Account.object. I can see record types ...
3
votes
1answer
712 views

Cannot set Assigned Approver as ‘Queue:Queue_Name’ in Approval Steps of Approval Process using Metadata API

If the queue does not contains parent Object as supported Object but doesnot contains childObject as supported Object user can set Queue as approver for a approval process created on child Object. But ...
3
votes
2answers
316 views

Salesforce Ant Migration Tool - HomePageComponent

I'm trying to figure out when using the Salesforce Metadata API (salesforce ant migration tool) how to pull back the custom links defined within the HomePageComponents. I've pulled down a blanket from ...
2
votes
1answer
109 views

Lightning App Builder xml retrieve problem summer '21

after the Summer '21 release we have noticed that when we are trying to retrieve a flexipage that contains few lightning-web-component, all of these are removed from the retrieved manifest. This ...
2
votes
0answers
30 views

Which permissions are needed to access “CustomField” object?

We are using the metadata API to access field metadata such as description, data type, default value etc. This is for standard objects but on custom fields e.g.: SELECT Id, Metadata, TableEnumOrId ...
2
votes
0answers
155 views

How to delete custom metadata type record using apex

By using CustomMetadata class we can update or create custom metadata type records as below, Metadata.CustomMetadata customMetadata = new Metadata.CustomMetadata(); customMetadata.fullName = '...
2
votes
0answers
141 views

Deployment error ThemeLayout's label must be unique

I am trying to use experience bundles in order to deploy communities from one sandbox to the other, so I retrieved the Experience, CustomSite and Network folder with package.xml in VSCode . But the ...
2
votes
0answers
130 views

Objects that don't support custom buttons (WebLinks)

I'm writing code that uses the metadata API to deploy a custom button (WebLink) to all CustomObjects in my Salesforce org. I just list out all objects wit a listMetadata and then do a retrieve and ...
2
votes
1answer
39 views

Retrieve past deployments

Is there any way (using Metadata API or other options) to retrieve all successful deployments to an org from the past, say, 6 months?
2
votes
0answers
109 views

How to programmatically update picklist fullName value in the same deployment without getting a “duplicate label” error?

I have the following code: <?xml version="1.0" encoding="UTF-8"?> <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> <fullName>Some_Custom_Field__c</fullName> ...
2
votes
0answers
37 views

What is the Metadata API name for Knowledge Setting “Enable list of cases linked to an article in Salesforce Classic (Classic Only)”?

Does anyone know the Metadata API setting for "Enable list of cases linked to an article in Salesforce Classic (Classic Only)" under Knowledge Settings? I can not find it under https://developer....
2
votes
0answers
164 views

Import CA-Signed Certificate from One Org into Another via MetadataAPI

I am trying to automate the set up of some of my lower sandboxes. In my SandboxPostCopy class, I'm using the FinancialForce MetadataAPI wrapper MetadataService to query and upsert a certificate. (...
2
votes
0answers
268 views

Querying for Validation Rules and Workflow Rules by criteria

I'm trying to query for all Validation Rules and Workflow Rules that have a specific value in the criteria. From developer.salesforce, I see that I can query Validation Rule, but I need to filter ...
2
votes
1answer
322 views

How to get compactLayouts through apex Metadata API

I am trying to get compact layouts using metatadataapi. I am using https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataServiceExamples.cls this repo to get ...
2
votes
1answer
121 views

Not able to retrieve BrandingSet thru Metadata API

Not able to retrieve BrandingSet (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_brandingset.htm) thru Metadata API package.xml that I used to retrieve BrandingSet thru ...
2
votes
1answer
528 views

How to set org wide default home page through metadata api? Not for specific app or profiles

This question has been asked by few previously and i see the answers are not pointing to the correct scenario I am having a need to deploy a new lightning home page and set it as default for the ...
2
votes
0answers
109 views

Metadata API's LeadConvertSettings call is failing with no error message

I am using Metadata API (REST) to create a mapping of a custom field between Lead and Opportunity objects. Here's my SOAP Envelope: <!-- vim: set ft=xml --> <s:Envelope xmlns:s="http://...
2
votes
0answers
109 views

SFDX - force:source:convert command not including label, sharingmodel, name in CustomObject

I only want to deploy a new CustomField to my Sandbox org. My initial package.xml is using the CustomField metadata type to pull my new field from my development organization. However, when I ...
2
votes
0answers
24 views

How do I initiate a call-out on metadata deployment?

Overview I would like to communicate with my team when I've deployed a change to production. For context, let's say I'm just need to make an outbound API call to my team's Slack channel, but please ...

1
2 3 4 5
7