Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [mdapi]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

Metadata API wrapper returns null for all entries

Let's say we have MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader = new MetadataService.SessionHeader_element(); service.SessionHeader.sessionId = ...
pincet's user avatar
  • 917
0 votes
1 answer
38 views

Metadata API ServiceController

Is there a way other than using mdapi wrapper (ServiceController) to e.g. retrieve, update and deploy back some particular (let's say PermissionSets or Profiles) entities inside the one given org. We ...
pincet's user avatar
  • 917
0 votes
1 answer
65 views

How does one delete a CompactLayout via mdapi?

I have a descructiveChangesPost.xml file to delete any components no longer required to which I've added a section for CompactLayouts, but it's not doing the delete. Is it not possible to delete these ...
Irene's user avatar
  • 1,849
0 votes
1 answer
75 views

Install package version via Metadata API in Apex class

I am doing automation on package installation after refreshing sandbox Found and follow this one https://github.com/litify/apex-mdapi/blob/55d755fc0c7e8d519dc10a5a3fa21aa0d7bda17b/apex-mdapi/src/...
vctqs1's user avatar
  • 95
2 votes
0 answers
273 views

Enabling feed tracking when creating scratch org not possible?

So, currently, there is no way to enable feed tracking for a standard object, during scratch org creation. This includes all settings in scratch org definition file and/or using an org shape. The ...
Vio's user avatar
  • 41
1 vote
0 answers
43 views

unable to remove login ip range using mdapi with simple_salesforce

I am able to get the profile login range ip, set it to what I want but when I try to update the profile I get many error messages. sf = Salesforce(username='[email protected]', password='...
Json's user avatar
  • 1,667
1 vote
0 answers
52 views

Share Email Folder Using mdapi

I am using financialforcedev's mdapi to create folder sharing in my Salesforce org - https://github.com/financialforcedev/apex-mdapi I am using the following code for Sharing DashboardFolder which ...
Madhurima's user avatar
  • 1,425
0 votes
1 answer
560 views

Cannot retrieve record type using metadata service

Hello I am trying to retrieve a record type to update its picklist values but whenever i try to do this it returns a weird object which has most of its values as null and I tried to use a name of a ...
Mohamed Montaser's user avatar
1 vote
3 answers
766 views

Mdapi deployment stucks in queue, even when there is no other deployments in progress

Mdapi deployment stucks in the queue, even when there are no other deployment in progress Steps To Reproduce: Prepare package for deployment run force:legacy:mdapi:deploy Expected result Deploymnt in ...
patryk's user avatar
  • 655
4 votes
1 answer
844 views

Delete orphan Guest User Profile

(In a Marie Kondo mood) I have a custom guest user profile: Foo. There are no assigned users to this profile (makes sense - it is a guest user profile) There are no Digital Experiences or Sites that ...
cropredy's user avatar
  • 72.2k
2 votes
0 answers
2k views

How to retrieve Salesforce reports (in a subfolder) using VS Code

How can we retrieve SF reports in visual studio code, I have tried below options: 1). Using manifest.xml -> Nothing happened, no reports extracted and no error shown either. 2). Using sfdx force:...
sunil gupta's user avatar
1 vote
2 answers
2k views

No Package.xml Found In Destructive MDAPI Deployment

I've already looked at the existing questions and made sure of the following: Only package.xml & destructiveChanges.xml are in the folder I'm trying to deploy. package.xml is empty outside of the ...
MadameEvil's user avatar
0 votes
1 answer
937 views

Update Custom Picklist Values Translations via MetadataService

I have a piece of code that allows me to update custom picklist field values: public static TM_EComUtils.genericResponse addPicklistValuesViaMetadata(String fieldAPI, String sObjectAPI, List<String&...
molinet's user avatar
  • 925
1 vote
0 answers
1k views

SFDX force:source:retrieve won't pulldown Workflow, WorkflowFieldUpdate, WorkflowRule, WorkflowAlert

I have tried the following: sfdx force:source:retrieve -m "Workflow, WorkflowAlert, WorkflowFieldUpdate,  WorkflowRule, ApprovalProcess, CustomObject:FF__Process__c" Trying to get a specific ...
Shuaib Ahmed's user avatar
1 vote
1 answer
483 views

Reading Metadata of CustomField with Custom GlobalValueSet returning null for valueSet

I'm using metadataAPi (apex-mdapi) My current use case is to read the metadata of a custom picklist field, and be returned with the complete list of picklist values available. Regardless of whether ...
David Picksley's user avatar
0 votes
1 answer
1k views

Is it possible to create a CMS workspace using API or with Metadata deploy?

I'm trying to see if we can create a CMS workspace by using Metadata API or any other way programatically, instead of creating it through the UI as mentioned here. Also if I create a CMS workspace in ...
SK.'s user avatar
  • 103
1 vote
2 answers
155 views

Is there a size limit in performing sfdx force:mdapi:convert?

I am attempting to convert a large src directory in mdapi format into source format. When I run "the sfdx force:mdapi:convert -r directoryToBeConverted -d directoryToCaptureConversion --loglevel ...
jschleicher's user avatar
5 votes
1 answer
645 views

Deployment is failing due to "weird" character

Our admin created a new picklist field (Client_Temperature_Status__c) on the Account object and the values added are actually emojis selected using the Emoji Picker on Windows. Here are the values ...
Rodrigo's user avatar
  • 1,295
0 votes
0 answers
499 views

Admin.UserCanEditFieldPermissions error while deploying using Bamboo

Error: "profileName", line 0: Error Admin.userCanEditFieldPermissions Having trouble finding information about the above error when deploying Profiles using Bamboo. The deployment in ...
wbrproductions's user avatar
0 votes
0 answers
3k views

SFDX force:mdapi:deploy Profile Search Layout: - System Administrator - not appropriate for object

I am trying to use force:mdapi:retrieve with force:madpi:deploy to move some sandbox dev org custom objects and supporting customisations to a scratch org, in order to be able to subsequently push a ...
josephh's user avatar
2 votes
0 answers
98 views

Metadata zip created via force:mdapi:convert fails during deploy due to 3rd party namespaces

We have a working DX project and are trying to deploy our code to full copy via sfdx force:mdapi:deploy command. Creating a zip file works fine, sadly the deployment fails with error message: force-...
Tuto's user avatar
  • 133
2 votes
0 answers
102 views

MDAPI retrieve of Flow from Packaging Org (1GP) has unexpected namespaced field

Given a trivial process builder decision block formula on the package's namespaced object: [mynamespace__Foo__c].mynamespace__Amount > 1000 Retrieving a Process Builder (via MDAPI) with source ...
cropredy's user avatar
  • 72.2k
0 votes
1 answer
282 views

Attaching namespaces to mdapi object before deploying to a sandbox org?

I am currently deploying my Salesforce code to a qa sandbox environment with the mdapi (sfdx force:source:convert -> sfdx force:mdapi:deploy). However, we need the object and pages and etc when ...
Adam's user avatar
  • 3
0 votes
1 answer
283 views

SFDX force:source:push fails only in CI environment

I am trying to shift a hybrid codebase to SFDX. I'm using Gitlab CI running in the default gitlab-runners and for some reason I haven't been able to discover I keep having my code deploys failing. I ...
ara6893's user avatar
  • 13
5 votes
1 answer
175 views

No Apex Classes retrieved from a Packaging Org

I've been asked to build a DevOps pipeline for an ISV that has a first-generation managed package (1GP) with no source in version control (yet). Executing sfdx force:mdapi:retrieve -r ./mdapiPkg -p ...
cropredy's user avatar
  • 72.2k
1 vote
2 answers
5k views

Deploying mdapi and source to org is failing with "Unexpected file found in package directory"

I'm having trouble deploying my mdapi Steps: sfdx force:mdapi:retrieve -s -r ./mdapipkg -p -- This gets the latest version of managed package from our Packaging Org -- I did not convert to the new ...
Ryan McNeely's user avatar
2 votes
2 answers
8k views

Deployment to Production Org using VS Code

I need one help to deploy different components like classes, triggers, objects, profiles, permission sets, etc from sandbox to the production org. I used following command to deploy all the items on ...
Ghanshyam Kumar's user avatar
3 votes
1 answer
910 views

Deploy only modified metadata in GitLab to Org

I followed this Trailhead "Build an Automated CI/CD Pipeline with GitLab" and have successfully built a pipeline that can deploy [or install] a package into an Org each time I push some changes into ...
Zhuang Paulus's user avatar
0 votes
0 answers
217 views

Getting null values when retrieving Flows via Apex Metadata API

When attempting to retrieve Flow-specific data via the Apex Metadata API each value in the key-value pairs is null. Here is the code: private static void getFlowMetadata(Double apiVersion, ...
Adam Drissel's user avatar
0 votes
0 answers
397 views

force:mdapi:convert command fails when source has a utility js file

I'm trying to follow the SFDX Developer Guide to convert an unlocked package to SFDX source format I'm receiving the following error: $ sfdx force:mdapi:convert --rootdir mdapipkg --outputdir ...
Sarath Lohidhakshan's user avatar
0 votes
1 answer
622 views

Push source to scratch org fails but mdapi:deploy works

I am in the process of converting an existing Managed Package to Salesforce DX and Retrieved the Metadata from the packaging org Converted it to Source format Created a scratch org and pushed source ...
Robert Sösemann's user avatar
4 votes
3 answers
23k views

How to retrieve Custom Profiles' objectpermissions using SFDX or MDAPI

Problem The <objectPermissions> tags are missing from my custom profiles when I pull from a scratch-org using SFDX or MDAPI. Steps to reproduce Create a new Scrach-org. Create a custom ...
Tredecies's user avatar
3 votes
2 answers
10k views

Can I retrieve an Email Alert via the Ant Migration Tool?

I wanted to retrieve an Email Alert via the Ant Migration Tool. However, I could not find it in a Metadata Types Reference. I suppose it's hidden under some other name like many other SF Metadata ...
Przemysław Długoszewski-Tamoń's user avatar
1 vote
1 answer
815 views

sfdx mdapi --wait parameter not working?

Followed a module in trailhead and when i got to the part where i was needed to deploy my work using this command sfdx force:mdapi:deploy -d mdapioutput -u MyTP -w 10 it throws an error. saying: ...
Clyde's user avatar
  • 67
4 votes
1 answer
775 views

SFDX development 'without ScratchOrg and Unlocked Packages' with Git [closed]

I think that the first reaction that anyone will have after reading my question will be 'Why do you want to move to DX without using ScratchOrgs and Unlocked Packages'? Well, we are planning to use ...
Praveen Tata's user avatar
4 votes
1 answer
4k views

Does the option to validate a deploy without saving for metadata that aren't in the Metadata API format exist in sfdx?

Is it possible to deploy metadata with sfdx to orgs that don't have source tracking, such as sandoboxes, either with sfdx force:source:deploy or sfdx force:mdapi:deploy? The first one uses metadata in ...
gvgramazio's user avatar
0 votes
1 answer
340 views

How to uninstall apex-mdapi package

A while back, I installed mdapi (https://github.com/financialforcedev/apex-mdapi) from github using the 'Deploy to Salesforce' button. We no longer need it, and it is taking up a lot of room in our ...
hamayoun's user avatar
  • 2,777
7 votes
0 answers
1k views

Is it possible to remove components from a Change Set using the Metadata API?

I'm using a trick that was mentioned in this related question to programmatically add elements to a Change Set using the Salesforce Metadata API. Basically, you treat the name of the Change Set as ...
Grekker's user avatar
  • 1,092
5 votes
3 answers
4k views

How to list all the metadata that is changed after a given date

how to get all the metadata changes after a given date. Tried using metadata api's listMetadata(), this gives all the data and here we can't filter using dates. This will run into limits for reports ...
ab0369's user avatar
  • 365
11 votes
1 answer
5k views

Can OWD be imported/exported as metadata?

I'm currently trying to create a scratch org which reflects our ludicrously complicated production org which contains hundreds of Roles. Upon deploying most of these, I get errors like: Error src/...
Brian Kessler's user avatar
2 votes
1 answer
501 views

force:mdapi:convert duplicate files

I've been trying to commit to having version control in our org, and I have been using DX to do so. My biggest complaint right now is that I end up having a ton of .dup files. And I don't know of the ...
Chance's user avatar
  • 1,070
0 votes
1 answer
984 views

FIELD_INTEGRITY_EXCEPTION when trying to update/create metadata records in managed package

We are using mdapi to create/update metadata records in a managed package. Everything works fine in the packaging as well as any other developer orgs. However, when we install the beta package in a ...
Ashish Narkhede's user avatar
1 vote
1 answer
716 views

Error deploying mdapi to packaging org with a namespace

I had a SFDX project which I converted to follow the "sfdx-falcon-template" structure. I also created a packaging org that would be used as a base for my managed package. Next I created a namespace ...
Eduard's user avatar
  • 5,181