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
0 answers
17 views

NullPointerException while trying to update picklist using Metadata Api

Trying to update a picklist value in the status field of Lead object using Metadata Api. Running into NullPointerException. Here is the code used to update picklist Value. String picklistapiname = '...
user avatar
0 votes
0 answers
18 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 ...
user avatar
0 votes
0 answers
39 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 ...
user avatar
  • 1,444
-2 votes
0 answers
31 views

How to automate the package installation/un-installation and upgrade using metadata API

I want to install, uninstall and upgrade managed packages automatically without manual intervention. i am going through some documents in google, where it is specified this can be done with metadata ...
user avatar
1 vote
0 answers
427 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 **...
user avatar
  • 293
1 vote
1 answer
22 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 ...
user avatar
0 votes
1 answer
28 views

Custom Field Creation in New Salesforce org [closed]

I am working in the sandbox of a brand new Salesforce Org. The ERD is in place. I have created Objects and their relationships. Now I will be creating custom fields on each of the 8 objetcs. There are ...
user avatar
0 votes
0 answers
23 views

How can I set the Field-Level Security of a field that is hidden from the admin?

In my organization, some objects were created but hidden for the System Admin profile. Doing the manual process is impossible due to the amount of fields that are hidden. So I'm trying to make a ...
user avatar
1 vote
1 answer
32 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 ...
user avatar
  • 13.2k
0 votes
1 answer
47 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 ...
user avatar
  • 718
0 votes
2 answers
43 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 ...
user avatar
0 votes
0 answers
13 views

Reading Record Types using Metadata API's readMetadata() , but getting null

string RecordTypeName='Account.accttype'; MetadataService.Metadata[] mdRecordTypes = service.readMetadata('RecordType', RecordTypeName).getRecords(); MetadataService.RecordType[] recordTypes = (...
user avatar
0 votes
1 answer
26 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 ...
user avatar
3 votes
1 answer
171 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 ...
user avatar
0 votes
1 answer
32 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 ...
user avatar
1 vote
0 answers
30 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 (...
user avatar
  • 31
2 votes
1 answer
90 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 ...
user avatar
1 vote
0 answers
20 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....
user avatar
  • 31
0 votes
1 answer
24 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 ...
user avatar
0 votes
0 answers
35 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....
user avatar
  • 1,378
0 votes
1 answer
77 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:...
user avatar
0 votes
1 answer
93 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 ...
user avatar
0 votes
1 answer
52 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 ...
user avatar
0 votes
1 answer
46 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 ...
user avatar
  • 129k
0 votes
0 answers
22 views

How to target Enhanced Landing Page Builder in LWC metadata?

How is it possible to target the new Pardot's enhanced landing page builder in an LWC component metadata? All of the below targets work, but none of them makes it visible for the landing page builder. ...
user avatar
  • 1
0 votes
0 answers
25 views

Is there any way to fetch fullnames for ProfilePasswordPolicy records using API? [duplicate]

Is there any way to fetch 'fullname' for ProfilePasswordPolicy records? I am trying to update and read records of ProfilePasswordPolicy but getting the error shown in the screenshot. I can get ...
user avatar
0 votes
1 answer
97 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 ...
user avatar
1 vote
0 answers
56 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, ...
user avatar
  • 285
1 vote
2 answers
82 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 ...
user avatar
  • 1,267
0 votes
1 answer
27 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 ...
user avatar
  • 23
0 votes
1 answer
17 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 ...
user avatar
2 votes
0 answers
15 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 ...
user avatar
  • 12.7k
-1 votes
1 answer
30 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 ...
user avatar
0 votes
0 answers
25 views

Unable to convert metadata wsdl to jar file (Metadata API version 53.0)

I am trying to convert the metadata wsdl (api ver 53.0.0) to jar file and I am getting the following error Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc." [WSC][wsdlc....
user avatar
2 votes
2 answers
296 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 ...
user avatar
1 vote
1 answer
466 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 (...
user avatar
0 votes
1 answer
94 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 ...
user avatar
  • 2,325
0 votes
1 answer
25 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 ...
user avatar
8 votes
1 answer
333 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 ...
user avatar
  • 33.5k
0 votes
1 answer
30 views

Are reports and Dashboard packagable

I have reports and dashboards for communities, which I am intending to package. are they package?
user avatar
  • 1
1 vote
1 answer
66 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 ...
user avatar
0 votes
1 answer
84 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 ...
user avatar
  • 2,325
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....
user avatar
2 votes
0 answers
34 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 ...
user avatar
0 votes
1 answer
57 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 ...
user avatar
  • 771
0 votes
0 answers
47 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 ...
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://[...
user avatar
0 votes
1 answer
75 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 ...
user avatar
  • 103
2 votes
0 answers
62 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 /...
user avatar
-2 votes
1 answer
140 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 ...
user avatar
  • 13.2k

1
2 3 4 5
23