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

Cannot set Assigned Approver as ‘Queue:Queue_Name’ in Approval Steps of Approval Process using Metadata API

If the queue does not contains parent Object as supported Object but doesnot contains childObject as supported Object user can set Queue as approver for a approval process created on child Object. But ...
5 votes
1 answer
7k views

Deployment error: "invalid cross reference id" / How do I determine which Profiles are referenced in .app metadata files?

I’m attempting to migrate metadata from one org to another using a package. But my mdapi:deploy command keeps failing with “Error test/applications/Underwriting.app Underwriting invalid cross ...
2 votes
1 answer
824 views

How to get compactLayouts through apex Metadata API

I am trying to get compact layouts using metatadataapi. I am using https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataServiceExamples.cls this repo to get ...
-1 votes
1 answer
35 views

Upload Metadata into Salesforce from GitHub

There is a GitHub repository with metadata such as tabs, custom objects with fields, apps, etc. What is the best approach to upload that metadata from GitHub into the SF Sandbox org? Thank you in ...
3 votes
1 answer
3k views

Case Status new picklist value deployment error through metadata api

We are trying to deploy some new picklist values on the Case object, on the standard Status field. One of them is the value "On-Hold" included on a new Support process, called "Support" which we are ...
5 votes
3 answers
17k views

Retrieving Profile with all Components Permissions using Metadata API

We have an application which retrieve Profiles from an Organisation but if we retrieve profile without specifying custom object or other component in package.xml file then it doesn't retrieve ...
4 votes
1 answer
989 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 ...
1 vote
1 answer
777 views

query and update time based actions

I have a requirement to update the time trigger condition in a active time based workflow rule Right now there are more than 1000 records related to it as i can see in the monitoring secttion, but i ...
0 votes
1 answer
32 views

2GP Managed package Custom Field visibility

I've a managed 2GP with some CustomObjects. I set their visibility to public like this: <visibility>Public</visibility> I've also a CustomField on the existing Opportunity object. But the ...
0 votes
1 answer
31 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/...
0 votes
0 answers
35 views

Unable to deploy experience cloud bundle with omniscript language settings

I get the following error when trying to deploy an experience cloud bundle via the metadata api to an org that has omnichannel components. We couldn't validate componentAttributes in .../views/theView....
0 votes
0 answers
29 views

OAUTH_DISALLOWED_SCOPES error when authorizing named credential

I am trying to create a named credential to authorize access to the Salesforce metadata API, as explained in this blog: https://gscloudsolutions.com/tips-tricks/using-named-credentials-with-the-apex-...
0 votes
1 answer
8k views

Is it possible to query/find reports using a particular report type?

I have a list of report types and I need to find out which reports in my org are using any of those report types. Is there a way to do so instead of manually visiting each report and checking its ...
3 votes
1 answer
82 views

2GP Unlocked package show CustomTab on install?

I have a 2GP Unlocked package that contains a CustomTab. The end goal is to have a managed 2GP, but I'm not there yet. After the installation of the package, if the user want to see the tab in the ...
1 vote
2 answers
3k views

Retrieving Local Translations from Metadata API call

I can successfully retrieve custom labels from my SOAP call to Salesforce Metadata API. But what I need is the local translations which overrides my labels. Are these translations are packaged or ...
0 votes
2 answers
1k views

Can Managed Package Custom Labels be retrieved via the metadata API?

Can anyone retrieve managed package custom labels via the metadata API? I have a few managed package custom labels that I can list metadata for However I have not been able to retrieve that metadata ...
0 votes
0 answers
28 views

Not able to Retrieve Managed Custom Field Translations using Metadata API?

We are working on a task where we need to retrieve and update custom field translations using Metadata API. The code is working fine for unmanaged custom fields, but for managed custom fields, it's ...
2 votes
2 answers
2k views

WebService returned a SOAP Fault: INVALID_SESSION_ID: This session is not valid for use with the API (async job)

I've take a look at a bunch of similar questions on stackexcahnge, but they weren't helpful. Here is the short explanation of the problem: We have a managed package with MetadataService class On one ...
1 vote
1 answer
46 views

Formula Field with Custom Metadata Type that is created in test method

I have a test method that needs to assert the creation of a document, the creation of such document is blocked by the evaluation of a (Boolean) Formula Field that depends on a Custom Metadata Type ...
0 votes
1 answer
901 views

Bulk Importing State and Country Global Picklist Value

Is there a way to mass upload a list of Country’s and States into the Country and State Territory Picklist section of setup in Salesforce? Looks like its been an idea for a while and looking at the ...
2 votes
2 answers
2k views

Metadata API - deploy custom field created in a managed package object

I have created a custom field on a managed package object. I know I can retrieve the field or the object using the metadata API <types> <members>TheManagedPackageCustomObject__c....
0 votes
0 answers
33 views

Deploying an Org Dependent Unlocked Package from Consultancy

We have a consultancy that may or may not update an org dependent unlocked managed package as well as a managed package. They made customizations on top of the package and we are trying to get all of ...
0 votes
1 answer
30 views

How can I update the External Data Source via Metadata Api or Tooling Api?

I have a record for External Data Source Named as ED1 which is password protected having below details. DeveloperName ED1 Endpoint abc.com IsDeleted FALSE IsWritable FALSE ...
6 votes
3 answers
10k views

Lightning Email Templates Deployment

I have been reviewing the documentation for Lightning Email Templates and it does not look like they can be deployed from one org to another. I have been unsuccessful retrieving them from the Metadata ...
0 votes
2 answers
1k views

Error while deploying objects

I just tried deploying an object that doesn't exist in my sandbox and the deployment failed with the following error: File name: objects/CM123__c.object, Component name: CM123__c Message: ...
0 votes
1 answer
39 views

How or do we have anyway to run ValidateMetadata via REST API before creating package version

i'd like to do a check metadata validation in advance even before creating package version in each PR. My question is do we have any way to do check code-coverage verify metadata before creating ...
0 votes
2 answers
2k views

Read Timeout error while making an API Inbound call to Salesforce

Getting Read Timeout error while making an API Inbound call to Salesforce. Is it possible to check at Salesforce is receiving connections.
0 votes
0 answers
26 views

Create profile tooling API giving INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

I created a CustomField using the tooling API: POST "tooling/sobjects/CustomField" But it creates a custom field without the permissions on "Field-Level Security for Profile" As I ...
0 votes
1 answer
866 views

Cannot update the value of a custom field on Case Object using jsforce

My Scenario I have a specific RecordType of a Case Called Customer Feedback. I can create a case with this specific record type like this: // Creates a new Case successfully, no custom fields. conn....
0 votes
1 answer
2k views

Unknown type name 'SurveySettings' specified in package.xml

I have retrieved source with a package.xml which includes following segment <types> <members>*</members> <name>Settings</name> </types> <version>...
10 votes
3 answers
34k views

How do I insert records in Custom Metadata Type through Apex?

I want to write a trigger on a custom object (Template__c) such that it invokes the creation or update of Custom metadata type records. Since the fields are not writeable, how do I achieve this? I ...
2 votes
1 answer
789 views

Is there a way for describing a List View and determining columns within APEX (without metadata service api)?

I've been reviewing the very promising APEX Metadata Namespace in Summer '17 (API v40.0) - Release Notes (Preview) But I'm unable to find any reference for retrieving ListViews of any Object. I'm ...
0 votes
2 answers
884 views

Content Detail pages host Salesforce CMS content. If you want content on the B2B_Pharma_Store1/views/newsDetail.json, add this site as salesforce CMS

When deploying a digital experience via Metadata API I am receiving the following error: Content Detail pages host Salesforce CMS content. If you want content on the B2B_Pharma_Store1/views/newsDetail....
1 vote
1 answer
85 views

Not able to call Metadata API Service from LWC controller using Apex class [duplicate]

How can I call a Metadata API from a LWC controller. I have a class which used Metadata API to fetch Entitlement process details which works fine in anonymous block but not with LWC My code is below : ...
1 vote
1 answer
1k views

Error during validation of change sets: "Required field is missing: pageOrSobjectType"

I'm having trouble with the deployment of a lightning app through change sets. This is the error I am getting: Required field is missing: pageOrSobjectType So I went through the source code of the ...
0 votes
1 answer
2k views

How to get all approval process using metadata APIs

I want to fetch all(active and inactive) approval process. I wanted to use metadata APIs, but I do not know how to design the request payload to get all the approval process. Is there documentation ...
0 votes
3 answers
909 views

Is it possible to update one profile's permissions to read all standard objects without doing it one by one?

I'm working with a very big org, and I would like to update one profile's object settings so they can read all objects in the org, and read all fields in the org without doing it manually. Is this ...
2 votes
1 answer
1k views

how to clone a Profile programmatically?

How can I clone a salesforce Profile? I'd prefer to use Apex or DX/CLI. Our normal process for setting up an Org is to clone standard profiles, and then customize those clones. This probably ...
0 votes
0 answers
41 views

How to get field references in Reports/ReportTypes?

I am trying to solve a problem of many unused field in my org. This will be addressed by running a periodic job that will figure out the field usage via number of references and letting the audience ...
1 vote
1 answer
2k views

Error when reading metadata: INVALID_TYPE: This type of metadata is not available for this organization

I am trying to get a list of all metadata objects with the given name. However, the code below fails: connection.readMetadata("ApexClass", new String[] {"SampleDeployClass"}); with this error: ...
1 vote
1 answer
46 views

Fields from lightning-record-form not displaying in screenflow

I am struggling with a screenflow here. I made a LWC which I want to include in a screenflow that runs in the salesforce homepage : When I start the screenflow, I can see that my LWC is here, but the ...
2 votes
0 answers
562 views

Deploying custom field on managed package object using the SFDX cli fails

We use a number of managed packages in our org. Two that are relevant here are Salesforce CPQ (namespace SBQQ__) and Chargebee (Namespace chargebeeapps). We have created a custom field CB_Quote_Id__c ...
0 votes
1 answer
71 views

My Dashboard API name it's weird

I have created a Dashboard in my org. The name for it it's "Pipeline Management", but I noticed that the api name it's "pKVGShxaKjvpVXNcMPCHPOUSSeneNd1". Why the api name looks ...
0 votes
1 answer
2k views

Retrieve standard NAME field label change through Metadata API

I have updated the standard NAME field's label on custom object through rename tabs and labels in Setup. But I am not able to retrieve the Name field label change. Here is my package xml: <?xml ...
-1 votes
1 answer
125 views

Metadata service Invalid Session Id on future method

I'm making a call to the Metadata service API. The Api call happens in future methods. I have tried both approaches of passing the Session Id as a parameter to the future method and also getting the ...
2 votes
0 answers
39 views

Difference between how the labels are returned in compact layout and search layout api if user language is different than english

I am calling salesforce API to get compact layouts( /services/data/v46.0/sobjects/Account/describe/compactLayouts/primary ). I get fields label in user's translated language.I am getting same response ...
12 votes
5 answers
9k views

Remove all old flow versions using SFDX

We have an old field referenced in older flow versions. We want to remove all older versions using SFDX and only upload the newest version without the field. Is it possible to do this without manually ...
0 votes
1 answer
1k views

Deleting all public groups from Org

We have an utility which imports all data from one org to another, this results in creating public groups every time import operation is carried out. Is there any way we can perform delete operation ...
0 votes
1 answer
46 views

How to retrieve Salesforce Org Feature settings such as Activity Settings

Is there an easy way through APEX (like Schema.describe) to access feature settings in an org? Specifically we are interested in checking if Feature Settings -> Activity Settings -> Enable ...
0 votes
1 answer
814 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
2 3 4 5
26