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
1 vote
1 answer
1k views

Deployment of custom app using package.xml

I work at project that consists of Lightning App including two Lightning Component Tab. I needed to deploy it to another org and continue working. I retrieved all necessary components using package....
Maciej Król's user avatar
1 vote
0 answers
116 views

Is it possible to retrieve metadata for Authentication Configuration from MyDomain using sfdx or mdapi?

The following settings are located at Setup -> My Domain (Authentication Configuration section) I'd like to be able to retrieve and deploy the settings (Specifically the "My Portal" ...
Edwin Schaeffer's user avatar
12 votes
1 answer
693 views

Create custom Index via Metadata API now possible?

While doing prodsync today I stumbled upon a folder named as customIndex. Funnily enough it had all custom indexes that we had asked SF to create for us. Once downloaded, I tried to save this in my ...
Pranay Jaiswal's user avatar
0 votes
0 answers
45 views

Error while saving MetadataServiceImported class

Trying to generate a MetadataService class using the instructions on the github repo of financial force, the MetadataServiceImported class generated from the WSDL is not getting saved and it says ...
Donal Shijan's user avatar
0 votes
0 answers
45 views

Metadata Types whose components can be a lot

As part of our Metadata related product, we are trying to re-design our apis to handle metadata list efficiently, especially considering some large enterprise customers. As part of that exercise, we ...
metasync's user avatar
  • 1,712
3 votes
0 answers
3k views

force:source:push: Metadata API request failed: The client has timed out

When I issue a force:source:push on a freshly provisioned scratch org, it gives me an initial feeling that it's working but then says there's a TimeoutOverflowWarning *** Pushing with REST API v53.0 **...
bkwdesign's user avatar
  • 541
1 vote
1 answer
137 views

Retrieve of Custom Field having __hd (history trending) files not happening through Metadata API

I recently enabled Tracking History for 3 fields inside the Case object. Even on the workbench in the metadata section of Custom Field, I can see a Case__hd folder where all the fields which are set ...
Satyam Kumar's user avatar
1 vote
1 answer
185 views

What are the options of using apex to delete protected custom metadata record from subscriber org?

I know that I can use Metadata API and can use Apex to run Metadata API to delete metadata, like Custom Metadata records. I know that I can leverage Metadata.Operations class to create or update ...
Patlatus's user avatar
  • 14.9k
0 votes
1 answer
745 views

Map Country Name with Currency ISO Code

Using the 'CurrencyType' object and the getDescribe method on the User's CountryCode, I can fetch from Salesforce, the Currency ISO codes and Country Names separately, but not together. I am not able ...
Brav's user avatar
  • 758
0 votes
2 answers
342 views

Full List of Metadata Types Can I deploy without Test Coverage?

I am looking for a full list of metadata types that I can deploy to Production without test classes. Flows (Not Sure) Apex Classes (Required) Custom Fields (Not required) Etc. I have searched the ...
Matthew Metros's user avatar
0 votes
1 answer
361 views

Test class for MetaDataAPI which adds new values to picklist fields

I have used metadata APIs to create new values to picklist values using apex. But unfortunately, I am not able to understand how to write the test class for the same. Can someone help me This is my ...
Muskan Khare's user avatar
3 votes
1 answer
239 views

Asynchronously call-in to a Managed Package

I am working on a Managed package App that makes callouts to a well-known external REST API. Some of the Endpoints are asynchronous, meaning they just give back a Job Id. Currently, ugly Apex is ...
Robert Sösemann's user avatar
0 votes
1 answer
196 views

Why a custom field, created via Metadata API, appears only in result of read request from Metadata API and in SObject settings UI?

I perform the following steps. In salesforce classic ui add a custom field of type Text to Account object. Retrieve this single field with readMetadata request (instead of "---" there goes ...
Alexander's user avatar
1 vote
0 answers
105 views

Web service callout failed error when trying to update duplicate rule

I am using apex-mdapi (https://github.com/financialforcedev/apex-mdapi) to update the duplicate rules from metadata API. While I am trying to read the metadata, I am not able to update the metadata (...
SFGEEK's user avatar
  • 31
2 votes
1 answer
417 views

"Invalid redirect_uri" on OauthKickoffUrl of Custom AuthProvider

The following Apex code uses Metadata and SOAP API to create a NamedCredential and Custom Auth Provider to connect to a public REST API that is authenticated via OAuth. public override PageReference ...
Robert Sösemann's user avatar
1 vote
0 answers
165 views

How to get the Field Label from the Columns retrieved from the List view Metadata?

I have written an Metadata API from https://github.com/financialforcedev/apex-mdapi to get the List view details. Below is my code: MetadataService.MetadataPort service = MetadataServiceExamples....
SFGEEK's user avatar
  • 31
0 votes
1 answer
113 views

Not able to list files under folder for dashboard through metadata api

I am trying to list all the files which are present inside a folder for the dashboard metadata type. for example:- I want to see what are the files which are inside the Service_Dashboards folder of ...
Satyam Kumar's user avatar
0 votes
0 answers
121 views

Update SSO using MetadataService class

I am using below code for updating SAML Identity Type in one of the SSO settings from UserId to FederationId : - MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service....
Avijit Das's user avatar
  • 1,398
0 votes
1 answer
422 views

Not able to retrieve Settings through Metadata API

I am trying to retrieve Settings Metadata using Metadata API. The request body is as follows:- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <soapenv:...
Satyam Kumar's user avatar
0 votes
1 answer
583 views

Error handling for Custom metadata Creation and Updating

I have a requirement to create and update custom meta data using apex , I'm passing the required values from my lwc , though i have found no proper example of handling the error since ...
Pavan Sahil's user avatar
0 votes
1 answer
314 views

How to get data for all profiles of 'ProfileSessionSettings' metadata object in single API call?

I want to fetch 'ProfileSessionSettings' for all applicable profiles in the single API call. I can do this operation for a single profile using the following request body, but am unable to do it for ...
yogeshasalkar's user avatar
0 votes
1 answer
227 views

Metadata.Operations.enqueueDeployment namespace error

My Apex code that does a Metadata.Operations.enqueueDeployment of some custom metadata records including in a 2GP managed package worked in a scratch org that had the namespace set, but fails when run ...
Keith C's user avatar
  • 134k
3 votes
1 answer
2k views

Deploying destructive changes using SFDX with --sourcepath flag

I've seen that finally destructive changes in SFDX deployments have been added - starting from version v53.0 (previously I needed to use ANT because of lack of this functionality). I have tested this ...
Łukasz Franczyk's user avatar
2 votes
1 answer
580 views

Metadata API not retrieving all language translation for custom labels

I have created a Custom label with its translation on the setup: I have also activated German language on the Setup->Translation Language Settings However, when I retrieve it via Metadata API, ...
user2018's user avatar
  • 341
1 vote
2 answers
319 views

Can we still use eclipse to connect to salesforce and fetch all metadata

Can anyone please share the way we can connect salesforce to eclipse to fetch all meta data. I used to have that earlier couple of years back but unfortuantely it's no longer working. Force.com plugin ...
David Mycka's user avatar
  • 1,285
0 votes
1 answer
56 views

Moving fields from QA to Dev Org with same Api Name

I have some fields in an org that I am working in building out some functionality. I was told that I need to move them into my dev org so that we can refresh the other org. I had originally build some ...
coinjar's user avatar
  • 23
0 votes
1 answer
117 views

Unable to update the record using API, getting 'An unexpected error'

I am trying to update the record on ProfilePasswordPolicy using the following request and getting this error. Could not figure it out. headers: Content-Type:text/xml charset:UTF-8 SOAPAction:login ...
yogeshasalkar's user avatar
2 votes
0 answers
18 views

How does objectTranslation files work for renaming standard fields

We are working with salesforce dx. When I try to relabel a standard field in Salesforce and retrieve that change into dx, the change goes to objectTranslation files. However, by looking at the file ...
Lance Shi's user avatar
  • 12.9k
-1 votes
1 answer
128 views

How to update records of 'ProfilePasswordPolicy' using SOAP API in POSTMAN?

I want to know how we can update records of the ProfilePasswordPolicy object using Postman. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profilepasswordpolicy.htm If I ...
yogeshasalkar's user avatar
2 votes
2 answers
939 views

Adding 300 IP ranges to list of allowed IP addresses on a profile

My real problem is that I need to add almost 300 IP ranges to the list of allowed IP addresses of a profile (thanks, Microsoft). It seems there is still no simple solution for this. On this site I ...
Sander de Jong's user avatar
1 vote
1 answer
2k views

How to get a property from file.js-meta.xml (which is in LWC) in the Apex using page layout

I need to pass a property that I will write (I think it can be called custom) from js-meta.xml a file in the Apex handler class. The question is how to read/receive it in the Apex using page layout (...
Pavel Kravets's user avatar
0 votes
1 answer
647 views

Unsupported metadata that cannot be deployed thru Metadata API

I'm in the process of deploying metadata from one org to a completely unrelated org that is downgrading from Unlimited license to Enterprise. I've read the documentation on the unsupported metadata ...
Dman100's user avatar
  • 2,405
0 votes
1 answer
58 views

Is there a way in Apex to search for picklist based on recordtype dynamically in apex without using any external library?

Is there a way in Apex to search for picklist based on recordtype in apex without using any external library? I know that we can capture the list of picklists from a wired function in lwc but that is ...
Sunil Kumar's user avatar
8 votes
1 answer
1k views

Is it possible to rename the API Name (Field DeveloperName) of Reports Apex or jsforce?

It is possible to read reports with Apex with SOQL SELECT Id, Name, DeveloperName from Report However it is NOT possible to update such records. I decided to use jsforce in this case and Metadata API ...
Uwe Heim's user avatar
  • 34.1k
0 votes
1 answer
136 views

Are reports and Dashboard packagable

I have reports and dashboards for communities, which I am intending to package. are they package?
Dharti's user avatar
  • 1
1 vote
1 answer
109 views

Does SOAP callout to MetadataService not updating Schema before the end of transaction?

I'm using MetatadaService class from https://raw.githubusercontent.com/financialforcedev/apex-mdapi/master/apex-mdapi/src/classes/MetadataService.cls, which I have updated to 53.0 version. I'm trying ...
Mariia Illarionova's user avatar
0 votes
1 answer
313 views

Using metadata api to deploy to production org

I used the sfdx force:mdapi:retrieve --retrievetargetdir force-app -k manifest/package.xml command to pull down the source metadata from a production org. The retrieval process successfully ran and ...
Dman100's user avatar
  • 2,405
1 vote
0 answers
20 views

How can I set PermissionsEdit and PermissionsRead on a custom field using SOAP? [duplicate]

How can I set PermissionsEdit and PermissionsRead on a custom field using SOAP? What is the URL endpoint and XML structure? I found this doc, https://developer.salesforce.com/docs/atlas.en-us....
avantassel's user avatar
2 votes
1 answer
109 views

Behavior when retrieving Translation/Profiles Metadata from a Scratch Org vs. other Org (Sandbox, Production, Developer Edition)

When retrieving Translations the docs say, the returned Metadata only include translations for the other metadata types referenced in package.xml Source: Translations | Metadata API Developer Guide ...
Matthias Rolke's user avatar
0 votes
1 answer
149 views

MetadataService read LeadConvertSettings

I'm trying to access LeadConvertSettings via MetadataService class but it's not working properly. List<MetadataService.LeadConvertSettings> result; MetadataService.MetadataPort service = new ...
molinet's user avatar
  • 825
0 votes
0 answers
61 views

reading Managed Packages via MetadataApi

is it possible to read infromation about sObjects that are from managed packages? I am using MetadataService from this git. Class I am very eager to use this method from class above, but is it even ...
Michal Romanczyk's user avatar
0 votes
0 answers
42 views

How can I make a custom field visible with the REST API (NOT THE WEB UI)? [duplicate]

How can I make a custom field visible with the REST API (NOT THE WEB UI)? Preferably when I create the custom field. Currently I create a field like this, curl --request POST \ --url https://[...
avantassel's user avatar
0 votes
1 answer
913 views

Pull Record Types per Permission Set through Metadata API

I'm trying to list the Record Types per Permission Set. Unfortunately, this cannot be done through SOQL Query (IIRC). That said, can somebody help me on how to achieve this through Metadata API (or ...
VanceSOQL's user avatar
  • 103
2 votes
0 answers
96 views

Retrieve GlobalValueSet colors with REST API

I have defined color values for a Picklist/GlobalValueSet in the Salesforce Ui. When I look up the resource directly /services/data/v53.0/tooling/sobjects/GlobalValueSet/{id} or do a SOQL query /...
Ben Potter's user avatar
-2 votes
1 answer
735 views

Where default flexi page assignment for a custom object is stored? [duplicate]

I need to automate assignment of default flexi page for both Desktop or Mobile experience. However, I am not sure how can I do that. Where default flexi page assignment for a custom object is stored ...
Patlatus's user avatar
  • 14.9k
1 vote
3 answers
3k views

How to resolve "Required field is missing: name" when deploying Flow?

I am deploying a flow using SFDX using metadata format. Here's the relevant package.xml entry: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap....
Swisher Sweet's user avatar
0 votes
0 answers
192 views

Identifying Nullable vs Non Nullable fields in an Object

I am using Salesforce Metadata API and facing an issue with identifying fields that are nullable. The nillable parameter doesn't seem to be 100% accurate. For example, in the Order object, the ...
theNaN's user avatar
  • 1
0 votes
1 answer
447 views

Error when creating scratch org "The processMetadataValues entry for TriggerType has an invalid value."

I try to create a scratch org, but every time I get the error "The processMetadataValues entry for TriggerType has an invalid value." <processMetadataValues> <name>TriggerType&...
Denis Titarenko's user avatar
0 votes
1 answer
1k views

Find all reports filtered by specific field and value

How can I find all reports in my Salesforce instance where the report is filtered by a specific field and value. We need to surface this data to management because they want to make adjustments to ...
Matthew Metros's user avatar
0 votes
2 answers
988 views

Deployments across orgs that are different versions

I am working in an environment where my Dev sandbox is API 53.0 and my destination QA sandbox is API 52.0. I use the metadata api to deploy changes but I am running into some frustrating issues when ...
Rory's user avatar
  • 349

1 2
3
4 5
25