Skip to main content

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
20 views

Collect pagelayout names per object in apex does not work for custom objects

Using this method to collect PageLayout names per object public static List<String> getLayoutNames(String objectName) { String sql = EncodingUtil.urlEncode('SELECT Name FROM Layout ...
wim van Beek's user avatar
1 vote
2 answers
35 views

Duplicating the list of fields from one object to a new object

I am a beginner in Salesforce APEX. Recently, I have been newly assigned to configure the Salesforce environment at my company. I originally worked in service operations and only know basic coding ...
jegni7777's user avatar
-1 votes
0 answers
47 views

'Error: duplicate value found: PlatformActionListId duplicates value on record' error on page layouts with recordId

I have an issue similar to a very active issue here How to debug the mysterious "duplicate value found: <unknown> duplicates value on record with id: <unknown>" error This issue ...
Martina's user avatar
1 vote
1 answer
38 views

Problems deploying (brandingset) via VS Code

I have this package.xml: <types> <members>LEXTHEMINGTR2C2</members> <name>BrandingSet</name> </types> ... <types> <...
Bernardo Lira's user avatar
0 votes
0 answers
53 views

Cross Object Field on FlexiPage in 2GP Package Issue

Trying to version/validate a package and continually running into issues surrounding cross object fields on a flexipage. Something went wrong. We couldn't retrieve or load the information on the field:...
bblackinton's user avatar
2 votes
1 answer
44 views

PATCH not supported by the /tooling/sobjects/CustomField HTTP REST endpoint?

The Tooling API CustomField documentation says: Supported SOAP Calls create(), query(), retrieve(), search(), update(), upsert() Supported REST HTTP Methods Query, GET, POST, PATCH but when I try a ...
Keith C's user avatar
  • 136k
0 votes
0 answers
35 views

Is there a way to retrieve translation for only one field?

We can retrieve object translation using sf project retrieve start -m "CustomObjectTranslation:Custom_Object__c-de" But what if I want to retrieve translation only for particular fields, ...
afphultl's user avatar
0 votes
0 answers
137 views

Difficulty Updating Named Credential Parameters via Metadata API in Salesforce

I'm encountering difficulties updating a Named Credential using the Metadata API in Salesforce. Below, I've outlined the steps I've taken to create the Named Credential and provided the code snippet I'...
Pavan's user avatar
  • 3
0 votes
1 answer
31 views

Getting profile permissions using readMetadata() API call

I would like to retrieve the recordTypeVisibilities for all the record types for a particular profile. Is there a way to achieve this using the readMetadata() API call instead of doing a file based ...
jacksparrow007's user avatar
0 votes
1 answer
76 views

No ApexPage named CommunitiesLanding digital experience deployment

I am trying to deploy digital experience metadata. Default index page is CommunitiesLanding (which is default sf visualforce page). I am getting error Error: In field: indexPage - no ApexPage named ...
Alivarq's user avatar
0 votes
0 answers
18 views

Programmatically get information on a packaged Connected App

I have a connected app packaged in a 2GP. Ideally, I wanted to update information (client credential user) on it but I'm fine with just detecting whether this param is present and having it manually ...
Al Cher's user avatar
  • 259
0 votes
0 answers
24 views

How can I retrieve a list view for CMTD that is part of a managed package?

There is a managed package called CMTD__EnhancedRelatedList__mdt. It's quite popular package used to customise related lists. I have put together a few list views for the CMTD records that are needed ...
vio's user avatar
  • 61
0 votes
0 answers
25 views

Why aren't picklist fields created using metadata.services?

MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader = new MetadataService.SessionHeader_element(); service.SessionHeader.sessionId = UserInfo.getSessionId()...
junhee's user avatar
  • 1
-1 votes
1 answer
45 views

Doubts with metadata api

Hello, good afternoon everyone, I have this problem, I created an integration user with the "Salesforce Integration" license and I had this error of insufficient access, I looked for a way ...
Maicon Douglas Rodrigues Garci's user avatar
0 votes
1 answer
187 views

GackID on standalone audience deployment

Hopefully someone can help me out with a gackId that I've been receiving. An unexpected error occurred with gackId 1372102114-24728 (1131023739). Try again or contact your Salesforce admin for help. ...
TylerTwoForks's user avatar
0 votes
0 answers
80 views

How do I bypass the error 'Org cache is only supported in Data Silo tests' in a test class that must use the seeAllData=true setting

I have written a batch class that uses the Metadata API and finds old reports and moves them to a purge folder. This works fine. However, test classes apparently can't create reports and they don't ...
JRob's user avatar
  • 1
0 votes
0 answers
24 views

How do I set <tabVisibilities> for Connections tab (SF2SF) in metadata?

We have multiple orgs and I would like to deploy the setting to Hidden for all profiles other than SysAdmin for the Connections tab (Salesforce to Salesforce). I have tried by using these options, but ...
Irene's user avatar
  • 1,849
1 vote
1 answer
50 views

Which org settings are included in a org shape?

Per this document https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_shape_intro.htm, org shape should include Features, Metadata API settings, edition, limits, and ...
Patlatus's user avatar
  • 17.2k
1 vote
2 answers
146 views

Get All the Reports Metadata Backup

Want to get all reports metadata from Salesforce, tried with VS code Org Browser, but it doesn't get me all the Reports. SELECT Count() FROM Report fetches 10000+ Reports Appreciate any help/...
RKM's user avatar
  • 517
0 votes
1 answer
52 views

fieldPermissions is null in the PermissionSet instance

I created a class to update field permission via Apex class few years back. Please refer snippet below: MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader ...
वरुण's user avatar
0 votes
1 answer
61 views

MetadataService readMetadata returns null for Record Type

I am implementing a function used to update the picklist values for a given record type. When I retrieve the metadata for the record type, I am receiving null for its properties. My code: // Create ...
Blake's user avatar
  • 131
0 votes
1 answer
79 views

Managed Package: Field History Not Reflecting After Installation/Upgrade

For my managed package I am trying to enable tracking history for my managed object field. I can see it in the source and build is also successful. But these changes are not reflecting, when my ...
shamikh's user avatar
  • 43
1 vote
0 answers
76 views

How do you programmatically retrieve step and order that an assessment question was defined in OmniScript?

I want to be able to create an assessment summary but certain question and question responses need to be grouped together in order to create a logical summary document. Is there a way to retrieve them ...
user144491's user avatar
2 votes
1 answer
113 views

Named Credential not created through SOAP Metadata API

We are connecting Salesforce from a third-party system, the requirement is to create some named credentials, custom metadata records, and remote site settings from the third-party System after ...
Rahul Gawale's user avatar
  • 12.2k
1 vote
0 answers
20 views

2GP post-installation Lightning Tab - set ConnectedApp.oauthConfig.isAdminApproved to true and assign profiles

For a 2GP, putting together a UI for System Administrators to manually navigate to after installation to automate post-installation configuration. Here's the part I am working on... Sets ConnectedApp....
nstuyvesant's user avatar
0 votes
0 answers
100 views

Knowledge__kav object's standard fields in Metadata API file issue

Is there anyone has tried to retrieve the Knowledge_kav object's standard fields via Metadata API before? Seems to me that it is not available for the Knowledge obj. When I use: <types> <...
Kenan Ce's user avatar
-1 votes
1 answer
67 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
85 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
73 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
  • 95
0 votes
0 answers
97 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
1 answer
293 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
89 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
1 vote
0 answers
169 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,261
1 vote
1 answer
77 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
96 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
54 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
43 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
  • 95
0 votes
0 answers
49 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
304 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
1 vote
1 answer
307 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
260 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
524 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
  • 15
2 votes
0 answers
52 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,526
0 votes
1 answer
86 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
53 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
1 vote
0 answers
245 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
  • 41
-2 votes
1 answer
118 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
  • 117
1 vote
3 answers
6k 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
  • 465
0 votes
0 answers
34 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
1 vote
0 answers
253 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

1
2 3 4 5
26