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
20 views

Find Report Type Id using Metadata API

I’ve been trying to find out if it is possible to get the id of a report type and everything I’ve found so far points to this doc: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/...
-2
votes
0answers
20 views

Can someone please post an example code to update assignment rules using Metadata API? [closed]

I want to update the standard assignment rules using metadta API but can't find any success in it. Can someone please help?
0
votes
1answer
20 views

Inserting records to ContentFolder and ContentWorkspace

Good day! I wanted to programmatically create a library. Manually in lightning mode you need to navigate to Files tab and then choose Libraries and then click the New Library button. Supply a name ...
2
votes
1answer
50 views

Is it possible to programmatically change connectedApp settings in production?

Background: I have a requirement to make it so that an SFDC connected app defaults/is super easy to set to Admin Users are Pre-authorized instead of All users may self-authorize. This setting is ...
2
votes
1answer
14 views

Is it possible to retrieve Inactive Process builder versions?

We use process builder heavily and sometimes I need to go and see what is there in the Inactive ones. I prefer downloading all flows(including Inactive) and searching in vs code. I tried the below ...
0
votes
1answer
19 views

What is the max xml file size that ANT support to retrieve and deploy the data in salesforce

I want to retrieve the metadata using ANT, have an XML file of size 2MB and total line are around 35000. When i run the command to retrieve the metadata I am facing error as max limit is 10000 files. ...
0
votes
0answers
33 views

Web service call out not allowed in test class [duplicate]

I'm trying to write a test class for below code, But it throws an error Web service call out not allowed in test class. Please help me to write a test class to below code. By using Test.setmock() I ...
1
vote
1answer
32 views

Metadata api/DX mdapi is retrieving incorrect values of lead process

I am retrieving Lead information through the metadata API and the business processes that come with it do not match what is in the org. I have verified the org I am retrieving from is correct. I also ...
0
votes
0answers
19 views

Unable to deploy List of Metadata fields to Layout by apex

When i deploy Layout with 1 field everything works fine whereas when i deploy fields as list , not even single field is showing in the Layout. Below is the code i am using for field creation,then ...
3
votes
0answers
26 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?
1
vote
0answers
25 views

Community Error When Deploying Via MetadataApi

I created a community in the target org which has the same name as the community in the source org. I retrieved and deployed the metadata from the source org to the target org using Metadata API ...
3
votes
1answer
70 views

Programmatically running “Quick Deploy”

After successfully completing a checkOnly deployment, is it possible to programmatically run the "Quick Deploy" action? Example: sfdx force:mdapi:deploy -d dist/my-pkg -w 5000 -c I don't see ...
0
votes
1answer
20 views

Unable to push Animation rule from Scratch org to Developer Edition Org

I am trying to complete App Builder Maintenance trailhead for Summer 19. However, I don't want to make change manually in the target organization since this is not interesting. Instead, I am ...
1
vote
1answer
20 views

Making additional (custom) metadata available for a field

I am looking for a way to add additional metadata to object fields for use by some Salesforce and non-Salesforce UI code. What I need is a small piece of custom JSON per field. (Yes I could create a ...
0
votes
1answer
23 views

Where to find list of standard metadata types supported?

Where to find list of custom metadata types to deploy/retrieve that are supported? For example: CustomObject
0
votes
1answer
35 views

Using Access Token as MetadataService sessionid

I am using MetadataService from LWC and since I don't get the session id in Lightning context, I am doing preauthorizing the org and getting the access token and storing it in a custom object. However,...
0
votes
1answer
22 views

Metadata language

I have a simple question. I was wondering what determines the language of the metadata that is being retrieved. For example, let's say I have org 1 where when I retrieve all of its layouts I see ...
2
votes
1answer
68 views

“Metadata Through Metadata API Functions” permission Not Working

I want to make a permission set such that a user only has Metadata Access and preferably only Read-Only Metadata access through Ant. The idea is I want to make a "Backup Metadata" user. I do not want ...
0
votes
0answers
15 views

Generate package.xml using Metadata API before submitting a retrieve call

I am submitting a retrieve call using Metadata API retrieveRequest(package). Before submitting the retrieve request, I need to generate the package.xml file for debug purposes. I can see that the ...
1
vote
0answers
15 views

Metadata Translation API: REST Request URL [duplicate]

I am trying to retrieve the translation for a custom picklist values , using REST I think i need to retrieve CustomObjectTranslation : https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/...
0
votes
1answer
29 views

Searching Salesforce metadata using Visual Studio Code

Is it possible to do key word metadata search using the Visual Studio Code Extensions similarly to Force IDE with Eclipse?
3
votes
0answers
22 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 ...
0
votes
1answer
32 views

Custom setting deployment

I have a custom setting called CAT_Custom into which i have a URL field called CAT_URL. I have different values for this URL field in both PROD and in STAGE environments. Now when i deploy this ...
4
votes
2answers
125 views

Activate Communities Settings: “Allow using standard external profiles for self-registration and user creation.” in a scratch org config file

Since Winter20, we have some test classes failing because of new Community Setting Allow using standard external profiles for self-registration and user creation. The problem is that we have ...
3
votes
1answer
75 views

Classifying metadata into destructiveChangesPre.xml vs destructiveChangesPost.xml

I understand how both destructiveChangesPre.xml & destructiveChangesPost.xml work, but I'm wondering if it's possible to algorithmically classify metadata deletions between the two (theoretically; ...
0
votes
1answer
32 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
22 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 ...
1
vote
1answer
27 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
37 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
47 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
27 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
375 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
21 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 ...
1
vote
0answers
35 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
22 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
22 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
20 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
35 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
37 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 ...
0
votes
0answers
18 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
217 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
53 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
94 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
32 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
50 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
87 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
34 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 ...
4
votes
1answer
119 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 ...