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.

262 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
3k 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
102 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
45 views

Metadata API: any drawback when using REST instead of SOAP?

Is there any drawback on using Metadata API through REST (that became available since Winter'19)? I only see good things such as: Smaller payloads: probably improving performance reducing the network ...
6
votes
0answers
106 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 ...
5
votes
0answers
64 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
0answers
63 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
1answer
959 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
773 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
194 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
2k 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
1answer
35 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
123 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
639 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
111 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
114 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
231 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
445 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
66 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
88 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 ...
3
votes
0answers
94 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
45 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
123 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 ...
3
votes
0answers
65 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
82 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
439 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 ...
3
votes
0answers
63 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
63 views

Metadata for User Interface options

Does anyone know whether the User Interface option Enable "Set Audit Fields upon Record Creation" and "Update Records with Inactive Owners" User Permissions can be used with Metadata?  Has anyone ...
3
votes
0answers
74 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
100 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
365 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
529 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
257 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
31 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
14 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
35 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
80 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
71 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
0answers
870 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 ...
2
votes
0answers
39 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
68 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
23 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 ...
2
votes
0answers
500 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 ...
2
votes
0answers
39 views

Cannot provide null for an SObjectField custom metadata record field via Metadata API

We're trying to update Custom Metadata records using the Custom Metadata API from Apex. The record has a field of type SObjectField. When we create we can omit this field and the result on the ...
2
votes
0answers
353 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 ...
2
votes
1answer
191 views

Fetch PageLayout from Java using Metadata API

I am trying to fetch an existing Page Layout using the Java client for the Metadata API, in order to update it. However, I don't think I can properly fetch it, as it is NULL. Here is my code: ...
2
votes
0answers
37 views

Managed Package - permissions for dynamically generated Visualforce pages

We're working on a yet-unreleased managed package using Salesforce DX. It seems to be standard in DX to manage most permissions in a more portable way via permission sets rather than profiles so we've ...
2
votes
0answers
310 views

REST Metadata API is not enabled for this organization?

This is a Enterprise Edition org and I can access API urls like /services/data/v41.0/sobjects/Account/001UHJB000jOJmw with no issues. How can I enable this? or Should I contact support for this?
2
votes
1answer
539 views

REST API: create dependent picklist values

I am aware that it is possible to create dependent picklist values using the Metadata API but I want to use the REST API. I know how to create triggers, classes, and pages but I can't wrap my head ...
2
votes
0answers
2k views

Case Status new picklist value deployment error through metadata api

We are trying to deploy some new picklist values on the Case object, on the standard Status field. One of them is the value "On-Hold" included on a new Support process, called "Support" which we are ...
2
votes
1answer
512 views

Is there a way for describing a List View and determining columns within APEX (without metadata service api)?

I've been reviewing the very promising APEX Metadata Namespace in Summer '17 (API v40.0) - Release Notes (Preview) But I'm unable to find any reference for retrieving ListViews of any Object. I'm ...

1
2 3 4 5 6