The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
26 views

Metadata API to create fields

I saw the following example in the Salesforce Docs for creating fields using the metadata api: My question is - How does the system know to create a field on the account standard object? I cannot find ...
0
votes
1answer
21 views

API Version and Ant Deployment tool

The package.xml in my git repo has an API version near the bottom: <version>47.0</version> When I deploy to a development branch org, it's OK. When I retrieve from the branch org, there ...
0
votes
0answers
16 views

Blocking deployments initiated via sfdx/ant

I have removed Modify Metadata Through Metadata API Functions permission for my user with hopes that removing this permission I can avoid any deployment using sfdx/ant. This didn't help. I can still ...
3
votes
0answers
22 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 ...
1
vote
1answer
32 views

System.UserInfo.getSessionId() and metadata API

I am trying to do an API within my Salesforce to get the describe metadata, from winter 19 release notes and this idea that was marked as already delivered (Allow Apex to call Salesforce REST and SOAP ...
0
votes
1answer
17 views

ANT Migration Tool deployment error: “Bad file: XML document structures must start and end within the same entity”

I know what this error means, but the XML I'm deploying (below) was generated by the Migration Tool after running ant retrieve, and every XML validator I've tried says it's valid XML, without typos. ...
0
votes
0answers
117 views

Invalid or missing required CSRF token when deploying metadata via Workbench

I am merging orgs and have the prepped all the package.xml files. I've also retrieved the metadata. When I deploy to the target org, I get this error message: 403 Forbidden Invalid or missing ...
0
votes
1answer
19 views

Retrieve Case Action - Send Email Metadata in VsCode

I have made changes to the pre-defined field values section of Case Action:Email in my scratch org. Upon pulling, VsCode retrieves nothing. Can someone help? How should I commit this change and under ...
0
votes
0answers
32 views

What feature do I need to enable to see Question-Question Layout or Reply-Reply Layout?

I'm having a bit of trouble recreating this and I'm not sure where to look. One of the orgs I performed the metadata API retrieve on has a couple layouts called Reply-Reply Layout.layout and Question-...
0
votes
1answer
20 views

What is the API name of system permission for analytics?

What is the API name of the system permission View Analytics on Communities pages? This system permission is not getting retrieved from my org.
1
vote
1answer
19 views

How to print all EmailTemplate component names using SFDX CLI?

I run the below command and it prints undefined. ~sfdx force:mdapi:listmetadata --metadatatype=EmailTemplate --targetusername=mysandbox --folder=unfiled$public undefined When I run the above command ...
0
votes
0answers
17 views

Metadataservice: Delete only Record Type dependency of picklist

I have a requirement to delete only Record type dependency of a picklist value. Suppose, for R1 record type A,B,C were values accessible of A__c custom field. Now I need to delete A from values under ...
1
vote
1answer
34 views

How to test a static void @HTTP method that creates custom metadata

Here's a fun one...I have a static @HTTP method creating metadata as a webservice. You can test metadata deployment containers, though not the actual deployment, as shown here, but apparently only if ...
0
votes
0answers
35 views

API Usage Notifications - How to subscribe not via UI, e.g. using API, ant deployment etc

When spinning up new sandbox from production we need to subscribe our admin user to receive 'API Usage Notifications'. So in order not to do it manually every time, we are looking for a way of how to ...
1
vote
0answers
17 views

How to take ExternalDataSource from one sandbox (DEV) to another sandbox (QA) through metadata using CI/CD pipeline

How to take ExternalDataSource from one sandbox (DEV) to another sandbox (QA) through metadata using CI/CD pipeline? ExternalDataSource metadata requires endpoint/username elements to be passed and it ...
10
votes
1answer
197 views

Custom metadata retrieval fails in Winter '20

In Winter '20 sandbox, retrieval for custom metadata using wildcard is failing: package.xml <types> <members>*</​members> <name>CustomMetadata</name> </types&...
0
votes
0answers
33 views

Metadata API + Custom Label Translation

Hello Salesforce experts! I would like to dynamically create "CustomLabelTranslation" using Metadata API. I am able to retrieve the translated value using specific language, but not able to then set ...
0
votes
0answers
14 views

Need to change the Tab name in through metadata

I want to change custom tab name using metadata deployment. I have below Metadata where i have included Label but still its not reflecting <?xml version="1.0" encoding="UTF-8"?> <CustomTab ...
2
votes
2answers
82 views

Find out programmatically if a field can be tracked

I've grappled with this one for a long time, and I am almost sure it's a gap in the platform. The problem I have is that I need a way to find out all the fields that can be tracked. That is to say, ...
1
vote
1answer
23 views

Can the Translation Workbench “Out of Date” values be accessed via the Metadata API?

When you're updating terms in the Translation Workbench there is a column indicating that the current translation is out of date. What mechanism in Salesforce checks these translations? Does it happen ...
0
votes
0answers
25 views

Updating Metadata of Standard Objects

Good day! I bumped into a question from here. I was wondering if there is a counterpart for this when it comes to Salesforce Standard Objects? Upon reading the answer, it suggests a library which ...
1
vote
1answer
28 views

Can you change set a Big Object?

I am trying to change set a big object from my developer sandbox to a full sandbox. I have seen here in the dev notes that it can be done via the metadata api. But nothing about changesets. So I ...
2
votes
1answer
55 views

Unauthorized endpoint when calling Metadata API from Apex in @future

I am running into the exception IO Exception: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu25.salesforce.com/services/Soap/m/42.0 when ...
2
votes
1answer
30 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
78 views

Is there a workflow for renaming or deleting metadata components purely with an SFDX developer flow?

We are currently migrating our Salesforce development workflows to sfdx. We have got CI up and running with CircleCI and really smooth deployments going for when there are additions to metadata or ...
0
votes
0answers
24 views

Can we query all processbuilder exist in system for an object. I am creating a document for a team

Is there any way I can export or query any process builder exist for particular objects from Org. I am creating a documentation for a quite complex org where there are many process builder each object....
3
votes
1answer
55 views

Remove all old flow versions using SFDX

We have an old field referenced in older flow versions. We want to remove all older versions using SFDX and only upload the newest version without the field. Is it possible to do this without manually ...
0
votes
0answers
42 views

Quick Deploy via ANT Not Working - UNKNOWN_EXCEPTION: invalid parameter value

I am attempting to use the Quick Deploy functionality through the metadata API, using the Ant Migration tool, and it is not working for me. I have setup a Jenkins job that passes the sf.​...
0
votes
0answers
28 views

Removing controlling field values (picklist dependencies) during deployment

We have multiple orgs on which we are running deployments using jenkins and ant deployment tool. We have problem when removing dependencies during deployment. So basically I'm able to remove ...
1
vote
0answers
29 views

Why are readable/editable fields missing from Profile.xml Metadata? Workaround?

I'm trying to build a "no permissions" baseline profile in a sandbox I just spun up from my production org before playing with a new integration (so I can assign permissions in a "least privilege" way)...
1
vote
0answers
18 views

Can't edit an active bot version

We are deploying Einstein Bot component from an org to other org by using Ant Migration Tool. The same component already exists in the target org and is active. So when we are doing this we are ...
0
votes
0answers
61 views

Metadata Retrieve issue Salesforce

When i try to access other org metadata item list after authentication getting the following error .. Web service callout failed: WebService returned a SOAP Fault: INVALID_CROSS_REFERENCE_KEY: ...
1
vote
1answer
56 views

Deploying Default_Opportunity.pathAssistant via the Metadata API causes Error: java.lang.IllegalStateException: Programmer error:

As title says, a deploy via Ant is failing when trying to deploy a path on opportunity. After searching, I found a few posts on the Salesforce forums back from 2017 related to this issue, but nothing ...
1
vote
2answers
37 views

Get list of all Custom Tabs in an org, including the creator of each

We are trying to clean up the tabs in a demo org (we've reached the limit of 100). I've been looking for a Metadata or Schema API, preferably one I can use from Apex, that will let me query for a ...
1
vote
1answer
41 views

How to create an Identity Provider using the Metadata API

I see all other types like AuthProviders but don't see a way to create an Identity Provider in Salesforce Metadata API.. Is there none?! And why?
0
votes
1answer
28 views

Update CustomField via Metadata API without including extraneous updates

as the title says, I'm working on a project to update the Description on the CustomField metadata type via the Metadata API and would like to figure out a way to do this without needing to read the ...
0
votes
1answer
28 views

How to automate my Post production refresh steps like updating the configuration through Apex code using Tooling/Metadata API

After every production refresh of Sandboxes I have to perform manual steps updating Custom Label, Remote Site Settings, Named Credential, Custom Settings and Custom Metadata. How can I automate the ...
1
vote
0answers
109 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 ...
5
votes
1answer
48 views

Standardized Production to Scratch-Org Approach

We are currently in the process of moving from using Welkin Suite and Classic to SalesforceDX/VS Code/Scratch-Orgs. Is there a standardized approach or automated process for making a Scratch-Org look ...
0
votes
1answer
34 views

Accessing MetataData API from Communities as community User

I am using MetadataApi, to get listview Metadata via Apex. if i logged in as System administrator it's working fine and get the data, but when i call same Apex Method from Community as Community user ...
1
vote
0answers
46 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 ...
0
votes
1answer
49 views

Can I exclude standard object fields from a managed package?

I'm trying to migrate metadata from one org to another using a package and the sfdx force:mdapi:retrieve and sfdx force:mdapi:deploy commands. Account object's Type field is causing a Picklist value ...
0
votes
1answer
11 views

Deploying report <timeFrameFilter> <dateColumn> <interval> “Last 2 Days” - not possible in UI or Metadata API?

Before I chalked this very simple reporting request to not being possible, I thought would check on here. I'd like to have a running report pull in a date field where the value could be the "Last 2 ...
3
votes
1answer
289 views

Metadata API Apex fails to create fields in Connected App

I am using the latest v46 version of the Financial Force Metadata API Apex Wrapper to create a Connected App but the values I put in the code are partly ignored. What is not working: ConnectedApp....
0
votes
0answers
25 views

Delete Custom object via Metadata api

I am trying to delete custom object using Metadata API. I created XML for delete metadata with SOAP API: <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-...
1
vote
0answers
25 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://...
0
votes
1answer
40 views

Query Org's Certificates in Apex using Metadata API

I am unable to retrieve the Certificates of an org using the Financial Force Metadata API Apex Wrapper although I see the object in the Metadata API Documentation and can query it using the workbench. ...
4
votes
1answer
234 views

Automate setup of an external identity provider via APIs

I use the Financial Force Metadata API Apex Wrapper to simplify an app setup using a custom UI. Part of the setup is the creation of a Self-Signed Certificate and its usage in a Single Sign-On Setting....
0
votes
0answers
28 views

Unable to deploy platform events from one sandbox to other

Trying to deploy platform events from one sandbox to another using jenkins. On plat form event we have trigger as well. While deploying it is throwing following error even though the package version ...
0
votes
0answers
20 views

Display fields from Pagelayout in VF Page

Requirement is like, we need to create a VF Page which should display all the fields from Account - Account Layout. So in future if any field is added to this page layout should reflect the same in ...