Questions tagged [mdapi]
The mdapi tag has no usage guidance.
41
questions
0
votes
1
answer
25
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 ...
0
votes
1
answer
30
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/...
2
votes
0
answers
109
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 ...
1
vote
0
answers
37
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='...
1
vote
0
answers
32
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 ...
0
votes
1
answer
376
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 ...
1
vote
3
answers
692
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 ...
4
votes
1
answer
638
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 ...
1
vote
0
answers
1k
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:...
1
vote
2
answers
1k
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 ...
0
votes
1
answer
811
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&...
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 ...
1
vote
1
answer
441
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 ...
0
votes
1
answer
765
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 ...
1
vote
2
answers
140
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 ...
5
votes
1
answer
498
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 ...
0
votes
0
answers
340
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 ...
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 ...
2
votes
0
answers
94
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-...
2
votes
0
answers
85
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 ...
0
votes
1
answer
266
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 ...
0
votes
1
answer
271
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 ...
5
votes
1
answer
167
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 ...
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 ...
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 ...
3
votes
1
answer
830
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 ...
0
votes
0
answers
204
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, ...
0
votes
0
answers
396
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 ...
0
votes
1
answer
602
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 ...
4
votes
3
answers
19k
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 ...
3
votes
2
answers
9k
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 ...
1
vote
1
answer
786
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:
...
4
votes
1
answer
762
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 ...
4
votes
1
answer
3k
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 ...
0
votes
1
answer
330
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 ...
7
votes
0
answers
948
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 ...
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 ...
10
votes
1
answer
4k
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/...
2
votes
1
answer
486
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 ...
0
votes
1
answer
882
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 ...
1
vote
1
answer
699
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 ...