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.

355 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
15 votes
1 answer
17k 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' ...
Chance's user avatar
  • 1,070
7 votes
1 answer
139 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 ...
Jeff's user avatar
  • 909
6 votes
0 answers
828 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 ...
javanoob's user avatar
  • 8,877
6 votes
1 answer
8k 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 ...
tjc4's user avatar
  • 215
6 votes
0 answers
235 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 ...
Eric's user avatar
  • 54.2k
6 votes
0 answers
159 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 ...
user360's user avatar
  • 445
5 votes
0 answers
190 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, ...
Fabien Taillon's user avatar
5 votes
0 answers
2k 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 ...
Shajesh J's user avatar
5 votes
0 answers
238 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> ...
Peter Knolle's user avatar
  • 29.1k
5 votes
2 answers
6k 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 ...
Etienne Rocheleau's user avatar
4 votes
0 answers
341 views

Can I get flow interview details using APEX/Metadata/Tooling API for any specific record?

My Use case: I have created a trigger flow on Lead to run after 3 days of lead creation. I want to show the interview status in a LWC component Users can pause/reschedule interviews from the LWC ...
Sanjay Kharwar's user avatar
4 votes
0 answers
1k views

Content Detail pages host Salesforce CMS content. I don't want these pages

When deploying a digital experience via Metadata API I am receiving the following error: Content Detail pages host Salesforce CMS content. If you want content on the B2B_Pharma_Store1/views/newsDetail....
Luke Bray's user avatar
  • 506
4 votes
1 answer
482 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 ...
Brian Miller's user avatar
  • 5,212
4 votes
1 answer
57 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 ...
David Márquez Delgado's user avatar
4 votes
0 answers
1k 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 ...
Nachiket Deshpande's user avatar
4 votes
0 answers
1k 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://...
Aislinn Hayes's user avatar
4 votes
0 answers
154 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 ...
wintermute's user avatar
4 votes
1 answer
129 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 ...
kwiknick's user avatar
  • 359
4 votes
1 answer
1k 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 ...
Sonal's user avatar
  • 555
4 votes
0 answers
343 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) ...
Bryan_Anderson_SL's user avatar
4 votes
0 answers
486 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 ...
SeanW's user avatar
  • 672
3 votes
0 answers
4k views

force:source:push: Metadata API request failed: The client has timed out

When I issue a force:source:push on a freshly provisioned scratch org, it gives me an initial feeling that it's working but then says there's a TimeoutOverflowWarning *** Pushing with REST API v53.0 **...
bkwdesign's user avatar
  • 581
3 votes
0 answers
582 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 ...
James Graham's user avatar
3 votes
0 answers
269 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> ...
kratos's user avatar
  • 541
3 votes
1 answer
234 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....
RockPile's user avatar
  • 303
3 votes
0 answers
852 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. (...
S.B.'s user avatar
  • 2,071
3 votes
0 answers
244 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/...
Kyle B.'s user avatar
  • 223
3 votes
0 answers
479 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?
javanoob's user avatar
  • 8,877
3 votes
0 answers
134 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 ...
Robert Sösemann's user avatar
3 votes
0 answers
1k 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 ...
Giramondo's user avatar
  • 131
3 votes
0 answers
3k views

SFDX deploy reporting subfolders

I am trying to deploy some reports using sfdx. However when I perform the deployment the report folders all sit as top level report folders and my subfolders do not appear as expected. My path is as ...
user3456401's user avatar
3 votes
0 answers
121 views

Uploading Self Signed Cert Through MetaData SOAP

I am trying to understand the right way to format a SOAP POST in order to upload a self-signed certificate into a scratch org. Based on here: https://developer.salesforce.com/docs/atlas.en-us....
trebleCode's user avatar
3 votes
0 answers
252 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 ...
SFDC Neuf's user avatar
  • 1,507
3 votes
0 answers
1k 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 ...
Ashutosh's user avatar
  • 119
3 votes
1 answer
1k 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 ...
Andreas86's user avatar
  • 357
3 votes
0 answers
202 views

Custom Object Tab is not visible in "Show All Tab" when created via Apex

We have a VF page which creates Object, fields, RecordType and assigns them to Profiles and also creates Tab for the object and assigns them to the profiles using the MetadataAPI wrapper. Below is ...
Praveen's user avatar
  • 10.1k
3 votes
0 answers
140 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&...
Eric's user avatar
  • 54.2k
3 votes
0 answers
2k 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 ...
Ruslan Kurchenko's user avatar
3 votes
0 answers
487 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 ...
powlo's user avatar
  • 2,650
3 votes
2 answers
385 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 ...
Double A's user avatar
  • 2,133
2 votes
0 answers
45 views

Difference between how the labels are returned in compact layout and search layout api if user language is different than english

I am calling salesforce API to get compact layouts( /services/data/v46.0/sobjects/Account/describe/compactLayouts/primary ). I get fields label in user's translated language.I am getting same response ...
Manjot Singh's user avatar
  • 3,516
2 votes
0 answers
974 views

Deploying custom field on managed package object using the SFDX cli fails

We use a number of managed packages in our org. Two that are relevant here are Salesforce CPQ (namespace SBQQ__) and Chargebee (Namespace chargebeeapps). We have created a custom field CB_Quote_Id__c ...
Kevin P's user avatar
  • 7,208
2 votes
0 answers
102 views

Get OAuth scopes for managed apps using API

I am exploring the Saleforce API in order to obtain the OAuth scopes for connected applications. As an experiment, I created two connected apps: Create a connected app manually say App1 by clicking ...
Prahalad Deshpande's user avatar
2 votes
0 answers
79 views

How to configure OAuth scopes for connected apps in 2GP

I'm confused about how the configuration of connected apps in a 2GP work. I've found a couple helpful pages in the documentation, but feel I'm still missing some important details. I currently have a ...
Rink Stiekema's user avatar
2 votes
0 answers
25 views

How does objectTranslation files work for renaming standard fields

We are working with salesforce dx. When I try to relabel a standard field in Salesforce and retrieve that change into dx, the change goes to objectTranslation files. However, by looking at the file ...
Lance Shi's user avatar
  • 13k
2 votes
0 answers
117 views

Retrieve GlobalValueSet colors with REST API

I have defined color values for a Picklist/GlobalValueSet in the Salesforce Ui. When I look up the resource directly /services/data/v53.0/tooling/sobjects/GlobalValueSet/{id} or do a SOQL query /...
Ben Potter's user avatar
2 votes
1 answer
543 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 ...
marzobryant90's user avatar
2 votes
2 answers
382 views

Deploy Metadata with Apex Testing Using REST error

I'm trying to deploy some ApexClass from Apex to Production Org using multipart/forma-data to /services/data/v48.0/metadata/deployRequest following docs. In the documentation is this example: POST /...
ondrakr's user avatar
  • 350
2 votes
0 answers
202 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 ...
SFNewbie's user avatar
2 votes
0 answers
439 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 ...
Maarten Van De Velde's user avatar

1
2 3 4 5
8