Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

3
votes
0answers
12 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 ...
1
vote
0answers
11 views

MetadataService in apex overriding the IP ranges on Profile instead of adding the new onces

I have requirement to update ProfileLoginIpRange on the profile. Lets say there are 5 IP ranges already added on the profile and I want to add 1 more to it. Code Used, MetadataService.MetadataPort ...
1
vote
1answer
12 views

Metadata API — Creating List Views throws (FIELD_INTEGRITY_EXCEPTION) when specifying Filters or Columns

I followed instructions given in https://github.com/financialforcedev/apex-mdapi to create list views in my dev org. I am trying to create List View for Accounts. I am able to create simple list ...
2
votes
2answers
21 views

Retrieve Page Layouts in Source Format

How can I get all page layouts from an org in Source Format? Some things I've tried # Retrieve $ sfdx force:source:retrieve -m "Layout" $ sfdx force:source:retrieve -m "Layout:My_Object__c" $ sfdx ...
0
votes
1answer
14 views

Issue with Updating Pick list Values through Metadata API in Apex Class

What I have done : Installed repository from GIT HUB In my Personal org https://githubsfdeploy.herokuapp.com/app/githubdeploy/financialforcedev/apex-mdapi Created a custom controller and method : ...
0
votes
0answers
12 views

Can we use Standard Object in Kafka Service on Heroku Platform?

Can we use standard object instead of external object and it's external data source in Kafka connect service on heroku platform ?
1
vote
1answer
18 views

Choosing API to restore an object

I've got a backup of objects such as User, Profile, etc. I wanted to restore them through the provided set of APIs. I was wondering if there is any predefined set of objects that can be restored ...
0
votes
0answers
24 views

PlatformActionList consuming API calls

I'm having trouble dealing with my API calls limit. I found that the main object that is consuming this API calls is PlatformActionList (I'm not a developer, I'm not even sure if this is an object). ...
0
votes
0answers
17 views

com.sforce.soap.metadata.QuickActionLabel problem when deploying PartnerCommunity using METADATA API

I'm trying to deploy a Community Partner in a Partial-Copy ORG, using Metadata-API and I find these errors: Problem unmarahalling NewCommunityCase.quickAction. New Community CaseNot a valid ...
0
votes
1answer
15 views

What if I want to Retrive an Custom app - what meta data type I should use

I made a custom app and I want to retrieve its metadata? How shall I do
0
votes
0answers
27 views

Unable to push files to the scratch org due to some apiversion error

I am getting an error when I try to push my files to the scratch org. Error: Flows must be used with a minimum API version of 44.0. Make sure that the sfdx-project.json file is set to use "...
0
votes
1answer
15 views

Cannot grant permission to edit Roll-up summary or formula fields

I am trying to give a profile edit access to a Formula field and Roll-up summary field, I did so with metadata like so: <fieldPermissions> <editable>true</editable> <...
0
votes
1answer
31 views

Apex class with namespace deploy via Metadata API

I want to deploy using metadata API. I have class classes/MyPackage__UninstallClass.cls with MyPackage namespace classes/MyPackage2__UninstallClass.cls with MyPackage2 namespace. But when I try to ...
0
votes
0answers
18 views

Deployment Error 'Field cannot be set for type Update a Record'

I have an automated process set up to move my code from Development to QA and when I try to move a Quick Action I am getting an error I have never seen before: 'Field cannot be set for type Update a ...
1
vote
1answer
53 views

MetaData API and Tooling API

Is it possible to get below things using Apex: I want to get field Updates that are used in a particular or all WorkFlow rule/s. I want to get Workflow rules and approval Processes that are ...
1
vote
0answers
10 views

Updating Standard Report Type via Rest API on Cases returning error: 'value \“\” is not one of the picklist choices.'

I am looking to update the report type of an existing report via REST API. First I get the report metadata via a GET/describe, then I string-replace just the report type (assuming there is just one ...
0
votes
0answers
16 views

How to create a new report programmatically and set audit fields?

I am looking to create a new report programmatically and set its audit fields (CreatedBy, CreatedDate, LastModifiedBy, LastModifiedDate). I followed this REST API Documentation to create a report ...
0
votes
1answer
29 views

Can I query Salesforce Queue and can I do it using the metadata or tooling APIs?

Can I query Salesforce Queue and can I do it using the metadata or tooling APIs? Looking to quickly access this data from Salesforce inspector, also looking to see if there is a way to check if a ...
0
votes
0answers
23 views

MIXED_DML @testSetup TestMethod [duplicate]

So I am seeing a very weird issue. I am getting a MIXED_DML error in one of my test methods. In the @testSetup annotated method, I am indeed perform a mixed dml transaction (shame on me). However, ...
0
votes
1answer
26 views

How can I retrieve LiveAgent Settings from an org?

I am using ANT to retrieve settings from a production org. I have been successful using the package file below to get LiveChatDeployment and LiveChatButton settings. <?xml version="1.0" encoding="...
10
votes
1answer
104 views

Will LightningComponentBundle and LightningComponentResource mapped into the database like AuraDefinitionBundle and AuraDefinition

I'm checking this on a Spring'19 v45 Sandbox in Execute Anonymous: [ select Id from AuraDefinitionBundle ] // ==> works fine! [ select Id from AuraDefinition ] // ==> flawless!...
0
votes
0answers
54 views

Missing information when deploying Connected App

I want to deploy a connected app in an other orgs but there is some parameters I can't find in the Metadata API (Can't find parameters in the screen shot) For exemple, I can't find a way to set the ...
1
vote
0answers
42 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 ...
0
votes
1answer
22 views

'Text ' is not a valid value for the enum 'FieldType'

I am trying to create fields dynamically on a custom object. Field's metadata info taking from csv file. When I am uploading the file then I am getting callout exception from MetadataService. ...
4
votes
0answers
24 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 ...
2
votes
1answer
21 views

How to set categoryGroupVisibilities in Permissionset XML for Metadata API

I'm trying to transition some of my Profile settings to Permission Sets to make them reusable. Trying to set the Knowledge Data Category access in the Permission Set. I can do it through the UI but ...
6
votes
1answer
422 views

How to push code to production with Visual Studio Code & DX

I am using Visual Studio Code to develop new functionality. However, after completing the testing in the sandbox, I want to push the code to production. When I choose "SFDX: Deploy Code to org", it ...
1
vote
1answer
31 views

Do we have an option to create UnManaged package using any Salesforce API call?

I want to create an unmanaged package using API call, is it possible? Is yes, please suggest the approach. Our expectation is to create a unmanaged package in a salesforce org and add the metadata ...
2
votes
1answer
40 views

Deactive ProcessBuilder with Metadata

This is the top of my process builder metadata file. I read here and here that you can set the status to 'Draft' and it will appear as inactive on the UI. Then I read here that you have to set '...
0
votes
1answer
35 views

Deploying GlobalValueSet and GlobalPicklist with ANT error

I am trying to deploy GlobalValueSet and GlobalPicklist with ANT but get the following error: globalPicklists/GP0.globalPicklist Global Value Set 0 0 Not available for deploy for this API ...
2
votes
1answer
54 views

How can I change the status of Trigger MetaData using Apex Programming(Tooling/MetaData API)

I am using this code to update metadata for trigger. public void createMetadataContainer() { HttpRequest req = createHttpRequest(endpoint+'/MetadataContainer','POST'); req.setBody('{"...
0
votes
1answer
41 views

Picklist value not retrieve through force IDE

I am trying to deployed opportunity record type and business process but it is showing the error : File Name: objects/Opportunity.object Full Name: Opportunity.Third Party Fee Page Action: ...
-1
votes
1answer
43 views

Updating NamedCredential through Apex [closed]

Question Is it possible to update or create NamedCredential from Apex ? some background from internet search From my investigation found that it's possible to update NamedCredential through ...
1
vote
2answers
64 views

Custom Metadata Loader tool for Production

Looking for input from others that have used the Metadata Loader tool for their Production Org. This is what I've been trying to do: Try the "Deploy to Salesforce" Button directly from this website ...
1
vote
2answers
45 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 ...
0
votes
0answers
21 views

CustomObjectTranslation upsert issue

I'm trying to grammatically update custom object's tab and name using CustomObjectTranslation. I'm using a metadata api call, manually crafting the needed xml. The call succeeds and I can see the ...
5
votes
2answers
506 views

What's the API name of system permissions?

I am adding the system permissions 'Manage Public List Views' and 'Create and Customize List Views' to a permission set via the Metadata API. The problem is I can't find their exact API name: <...
1
vote
1answer
19 views

How to use VSCode to find which reports are using a specific field

I have used Eclipse in the past but unfortunately, Eclipse and Force.com IDE no longer work for me. I have switched over to VSCode along with the Salesforce DX and forcecode extensions (among many ...
2
votes
1answer
28 views

Can a Managed Package with a password be imported through SFDX?

We are currently trying to figure out whether/how we might use SFDX. Our org has FinancialForce Accounting installed. This managed package is required by several other managed packages and it heavily ...
6
votes
1answer
76 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/...
-1
votes
1answer
32 views

How can I get meta data of a visualforce page which is used in a Page Layout of a particular object?

I have a question i.e. how can I possibly extract meta data of a Visualforce page inside a Page Layout of an object. For fetching the page layout I use following API request : https://ap4....
0
votes
1answer
52 views

Salesforce -Moving metadata showing error at the time of deploy

I am trying to move metadata through ANT tool, data also retrieved but at the time of deploying the data to another sandbox it is showing error like : All Component Failures: triggers/...
0
votes
0answers
57 views

Clone Lightning Component Using Apex

I have used Metadata API to read and create Lightning Component, but I am able to clone only Lightning Component which is created by me. I am not able to clone all Lightning Component. Actually, I am ...
0
votes
0answers
34 views

Generating Documentation for your Salesforce Instance

I have been searching the internet for documentation of an Salesforce instance for a long time. It's always been a tiring job and takes a lot of time to document an instance. I'm aware of ApexDocs ...
7
votes
1answer
189 views

Metadata API error while reading Picklist: Web service callout failed: Unable to find apex schema info

I am trying to read a custom dependent picklist field and update it's field-dependencies. I have followed the common resources found online and getting the below error: FATAL_ERROR System....
0
votes
2answers
114 views

SFDX and MDAPI Deploy Issues

I just started working with DX again. When deploying a DX project using the MDAPI to a production org, I get a lot of feature missing errors during the deploy. I have my set my default scratch org ...
2
votes
0answers
28 views

SFDX Can't Pull Source from Scratch Org “Metadata API received improper input” AppMenu and AppSwitcher [duplicate]

I'm using SFDX and I made a change to the visibility of my app in my scratch org but when I try to pull the changes down (sfdx force:source:pull) I get: ERROR: Metadata API received improper input....
1
vote
1answer
55 views

How to update the FLS using Salesforce Metadata API in a bulk update?

I have a set of fields in the array list which I wanted to give FLS with Read access. I'm using below piece of code to update the field level security using Salesforce API in java language. But the ...
0
votes
2answers
96 views

deploying and retrieving Address settings (State & Country picklists)

I'm having problems understanding how to deploy Address.settings with the Metadata API. As in: how do I structure the package.xml? I have this as Address.settings (shortened for brevity) <?...
2
votes
1answer
36 views

How to “Enable access levels for sharing report and dashboard folders” with DX or MDAPI

In order to create report folders, you must check the box "Enable access levels for sharing report and dashboard folders" in Classic setup (search Folder Sharing in setup). Is there any way to ...