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 votes
1 answer
34 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 ...
BB0202's user avatar
  • 11
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 ...
Math M.'s user avatar
  • 135
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/...
vctqs1's user avatar
  • 55
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-...
Jelle van Geuns's user avatar
0 votes
0 answers
33 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....
Rob D's user avatar
  • 56
3 votes
1 answer
80 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 ...
Math M.'s user avatar
  • 135
0 votes
0 answers
27 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 ...
Chirag Mehta's user avatar
  • 1,291
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 ...
djpeluca's user avatar
  • 187
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 ...
coinjar's user avatar
  • 23
0 votes
1 answer
29 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 ...
Pratik Shambharkar's user avatar
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 ...
vctqs1's user avatar
  • 55
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 ...
Roland's user avatar
  • 101
1 vote
1 answer
84 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 : ...
Sfdc's user avatar
  • 29
0 votes
0 answers
39 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 ...
Apex Srinivas's user avatar
1 vote
1 answer
45 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 ...
CelineD's user avatar
  • 43
0 votes
1 answer
65 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 ...
LauraB's user avatar
  • 25
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 ...
Manjot Singh's user avatar
  • 3,408
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 ...
Nelson Ramalho's user avatar
0 votes
1 answer
40 views

Can a Metadata package be pushed to a Developer Edition?

I have a Metadata copy of the managed package I work on. I have attempted lots of sfdx commands and sf commands. None of them have successfully pushed the package to my developer org. Any suggestions ...
seekingPeace's user avatar
0 votes
0 answers
80 views

Getting insufficient access rights on cross-reference id when deploying Analytics Dataset components

Just created a scratch org and now attempting to deploy an entire wave folder, with one app, multiple datasets, and one dashboard. None of the Analytics Dataset metadata components want to deploy and ...
Vio's user avatar
  • 31
-2 votes
1 answer
57 views

Best method to get Country/Territory picklist values from Salesforce API

Is there currently any way to get the values of the Country/Territory picklists via REST API call from Salesforce? I can see there are other methods, but currently the only method via the REST API ...
G-Man's user avatar
  • 17
0 votes
1 answer
530 views

SFDX deploy , item not found in zipped directory

I am trying to use SFDX in visual studio code to deploy only changes , and not the entire source I have changed flexipages, custommetadata and Layout <?xml version="1.0" encoding="...
Jay Rizzi's user avatar
  • 455
0 votes
0 answers
28 views

Metadata API - AnalyticsSettings - enable​Report​Hide​Xls​Export​Pref

I call Metadata API - AnalyticsSettings - to check the key: enable​Report​Hide​Xls​Export​Pref. For some reason, When I changed to value in the UI checkbox, it doesn't influence the API value. Can ...
Yuavl_Dayan's user avatar
0 votes
0 answers
80 views

Rotating External Credential Principal

I am looking to call an external API from Salesforce using AWS Signature v4. The external API is using AWS API Gateway with IAM authorization enabled. I have created an access key for an IAM user and ...
GenePADI's user avatar
0 votes
0 answers
43 views

Using Salesforce Metadata API can we create/update 'Branding Set' with the respective 'Lightning Experience Theme'? If so how? [duplicate]

Using 'BrandingSet' Metadata API I am able to create a New Branding Set, along with the necessary Property Values & Images. But to enable the Branding Set so that it's visible in the UI found out ...
Blake's user avatar
  • 1
0 votes
0 answers
171 views

Deploying Lightning Email Templates via Metadata API

I am getting this error when attempting to deploy my Lightning Email Template: You don't have the right to create Lightning pages of type EmailTemplatePage. In my deployment I have the .email file and ...
Laura Castro's user avatar
0 votes
1 answer
90 views

How to activate another standard Theme in "Setup -> Themes and Branding" but via metadata deployment or some api call

The general goal is to have different theme being set up for sandboxes vs prod org, so that users will not create test data accidently in prod org. To achieve this, we are trying to script/automate ...
wesaw's user avatar
  • 2,990
0 votes
1 answer
60 views

Is there a way to retrieve metadata (Label) of all Mobile & Lightning Action - Metadata.Operations

right now I'm using Metadata calling from Apex. Apex code: public static List<String> getPageLayoutInfo(Id recordId) { String sObjectType = recordId.getSObjectType().getDescribe()....
Pam's user avatar
  • 97
2 votes
2 answers
171 views

How to get pagelayout assigned to a non admin users in apex

I am trying to get pagelayout assigned to a user by querying ProfileLayout Object. I am running this query. select Layout.FullName from ProfileLayout where ProfileId='xxxxxxxxxxx' and recordtypeId = '...
Manjot Singh's user avatar
  • 3,408
0 votes
2 answers
127 views

Is there a way to see created by , last modified by in field definition using tooling api, metadata api or other ways in Apex?

I need to query the Fields highlight in the below snapshot is there any way to query them through tooling API/Rest/SOAP? Usecase: I need to know who created the custom fields last month.
Gurmeet singh's user avatar
5 votes
1 answer
119 views

Can't find Apex Jobs that are blocking deployment

I am trying to delete a couple of old unused Apex Classes in our Production. Every time I try to delete all or one of them I get the following error message: "This apex class is referenced ...
Florian's user avatar
  • 53
0 votes
1 answer
24 views

What is the <userPermission> for RunFlows to add it to an MDAPI deploy

I've extracted the metadata for the profiles, but cannot find any setting that allows me to deploy this. I tried using this, but it tells me 'RunFlows' it not a valid option. How can I deploy this ...
Irene's user avatar
  • 1,765
0 votes
0 answers
39 views

Error while calling readMetadata() ,unable to find end tag at: START_TAG seen

I have written a Java code for getting the metadata though readMetadata(), but the following error is always reported after fetching a portion of the data: **Exception in thread "main" java....
Arthur Xingxing's user avatar
0 votes
1 answer
166 views

Deploy Metadata with Apex Testing Error

I am trying to deploy Omniscript which is stored in a zip file inside a static resource. I am following this documentation here. Here is the code - ` public class MetadataDeploymentCurl { public ...
Chinmay Agrawal's user avatar
-1 votes
1 answer
122 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 ...
Saurabh's user avatar
  • 27
0 votes
0 answers
35 views

Unexpected REQUIRED_FIELD_MISSING when modifying DataWeaveResource in the Metadata API

I'm trying to create a DataWeaveResource programmatically using the metadata API. I'm able to do this just fine by deploying a metadata ZIP, but I'd like to also be able to do it with the API, so I ...
WirthLuce's user avatar
  • 153
0 votes
0 answers
31 views

How to cover metadata port service test Class [duplicate]

@AuraEnabled public static void createKnowledgeFieldsetMetada(){ MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader = new MetadataService....
PraBin Das's user avatar
0 votes
0 answers
178 views

How to find out if a schedule triggered flow is running as a batch from the xml metadata?

This is the xml of schedule triggered flow. How to know if it is changing a batch of records? <?xml version="1.0" encoding="UTF-8"?> <Flow xmlns="http://soap.sforce....
Sandeep Pani's user avatar
0 votes
1 answer
357 views

How to determine the type of flow using the XML metadata file of the flow?

How do I determine whether a flow is a Screen Flow, Schedule-Triggered Flow or Record-Triggered Flow etc. from the metadata? Here is a flow of type Screen Flow: rule.flow <?xml version="1.0&...
Sandeep Pani's user avatar
1 vote
1 answer
96 views

Can default product quantity of 1 be enabled with Opportunity settings via Metadata API?

From the UI, there is a setting that can be enabled: Setup > Opportunity Settings > When users add a product to an opportunity, insert a quantity of 1 I cannot find a way to enable this via ...
Zosoled's user avatar
  • 93
2 votes
0 answers
538 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 ...
Kevin P's user avatar
  • 7,188
0 votes
1 answer
247 views

Programmatically list all Profiles and compare the permissions

I'm working on building a tool in Salesforce that allows me to compare two profiles. As part of this tool, I need to programmatically list all profiles in Salesforce along with their permissions. ...
Krishnamurthy's user avatar
4 votes
2 answers
902 views

Is there a *public-facing* list of GACK codes?

While Salesforce's internal processes are somewhat shrouded in mystery, we have been allowed a high-level look at the GACK process. What our team is noticing is that certain GACK IDs are consistent : ...
Rob Cowell's user avatar
0 votes
1 answer
78 views

How to include custom metadata records when building a release artifact with the salesforce CLI

Im trying to generate a release artifact by converting some source files to metadata format so I can deploy it with the following command: sfdx force:mdapi:deploy... this is the command I'm using for ...
Giovanni's user avatar
0 votes
1 answer
241 views

Salesforce metadata API retrive field updates

how can i retrive all the field updates in a salesforce org. Is it possible with Package.xml <types> <members>*</members> <name>Workflow</name> </types> <...
Shanker Paudel's user avatar
0 votes
1 answer
385 views

How to upload a .crt or .jks certificate to Salesforce using API?

I would really like to upload a certificate to Salesforce via API. The https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_certificate.htm says it's possible. But I'm ...
Andrii Muzychuk's user avatar
0 votes
0 answers
66 views

Retrieving Scopes of a ConnectedApplication

What methods or APIs can be used to obtain the scopes associated with a ConnectedApplication Just like I get in ConnectedApp -> ConnectedAppOauthConfig
Yuavl_Dayan's user avatar
0 votes
1 answer
150 views

Using the wire adapter to get metadata for my object?

I am trying to use the Salesforce Object Query Language (SOQL), and the Salesforce Object Describe API to import the objects and fields data into my JavaScript file. I am a bit lost on where to start, ...
Pinto's user avatar
  • 128
0 votes
1 answer
360 views

SFDX deployment of Salesforce Data Pipelines: Best Practices?

The project we're working on has a robust CI/CD pipeline (Circle CI) using scratch orgs for development Git branches. If approved, Pull Requests from dev branches are merged into an integration ...
Talkin Data's user avatar
0 votes
0 answers
115 views

Error retrieving metadata for entities of type: Layout. Error message: record limit reached. cannot submit more than 10 records in this operation

We are using Lightning Aura component to display tabs dynamically based on the record types and Layouts. When trying to retrieve more than 10 records using Metadata.Operations.retrieve in the code it ...
Anika's user avatar
  • 1

1
2 3 4 5
26