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

Metadata Retrieve issue Salesforce

When i try to access other org metadata item list after authentication getting the following error .. Web service callout failed: WebService returned a SOAP Fault: INVALID_CROSS_REFERENCE_KEY: ...
1
vote
0answers
17 views

Deploying Default_Opportunity.pathAssistant via the Metadata API causes Error: java.lang.IllegalStateException: Programmer error:

As title says, a deploy via Ant is failing when trying to deploy a path on opportunity. After searching, I found a few posts on the Salesforce forums back from 2017 related to this issue, but nothing ...
1
vote
2answers
29 views

Get list of all Custom Tabs in an org, including the creator of each

We are trying to clean up the tabs in a demo org (we've reached the limit of 100). I've been looking for a Metadata or Schema API, preferably one I can use from Apex, that will let me query for a ...
1
vote
1answer
32 views

How to create an Identity Provider using the Metadata API

I see all other types like AuthProviders but don't see a way to create an Identity Provider in Salesforce Metadata API.. Is there none?! And why?
0
votes
1answer
26 views

Update CustomField via Metadata API without including extraneous updates

as the title says, I'm working on a project to update the Description on the CustomField metadata type via the Metadata API and would like to figure out a way to do this without needing to read the ...
0
votes
1answer
20 views

How to automate my Post production refresh steps like updating the configuration through Apex code using Tooling/Metadata API

After every production refresh of Sandboxes I have to perform manual steps updating Custom Label, Remote Site Settings, Named Credential, Custom Settings and Custom Metadata. How can I automate the ...
0
votes
0answers
14 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 ...
4
votes
1answer
32 views

Standardized Production to Scratch-Org Approach

We are currently in the process of moving from using Welkin Suite and Classic to SalesforceDX/VS Code/Scratch-Orgs. Is there a standardized approach or automated process for making a Scratch-Org look ...
0
votes
1answer
28 views

Accessing MetataData API from Communities as community User

I am using MetadataApi, to get listview Metadata via Apex. if i logged in as System administrator it's working fine and get the data, but when i call same Apex Method from Community as Community user ...
0
votes
0answers
19 views

How to set org wide default home page through metadata api? Not for specific app or profiles

This question has been asked by few previously and i see the answers are not pointing to the correct scenario I am having a need to deploy a new lightning home page and set it as default for the ...
0
votes
1answer
19 views

Can I exclude standard object fields from a managed package?

I'm trying to migrate metadata from one org to another using a package and the sfdx force:mdapi:retrieve and sfdx force:mdapi:deploy commands. Account object's Type field is causing a Picklist value ...
0
votes
1answer
9 views

Deploying report <timeFrameFilter> <dateColumn> <interval> “Last 2 Days” - not possible in UI or Metadata API?

Before I chalked this very simple reporting request to not being possible, I thought would check on here. I'd like to have a running report pull in a date field where the value could be the "Last 2 ...
2
votes
1answer
245 views

Metadata API Apex fails to create fields in Connected App

I am using the latest v46 version of the Financial Force Metadata API Apex Wrapper to create a Connected App but the values I put in the code are partly ignored. What is not working: ConnectedApp....
0
votes
0answers
20 views

Delete Custom object via Metadata api

I am trying to delete custom object using Metadata API. I created XML for delete metadata with SOAP API: <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-...
1
vote
0answers
23 views

Metadata API's LeadConvertSettings call is failing with no error message

I am using Metadata API (REST) to create a mapping of a custom field between Lead and Opportunity objects. Here's my SOAP Envelope: <!-- vim: set ft=xml --> <s:Envelope xmlns:s="http://...
0
votes
1answer
27 views

Query Org's Certificates in Apex using Metadata API

I am unable to retrieve the Certificates of an org using the Financial Force Metadata API Apex Wrapper although I see the object in the Metadata API Documentation and can query it using the workbench. ...
4
votes
1answer
184 views

Automate setup of an external identity provider via APIs

I use the Financial Force Metadata API Apex Wrapper to simplify an app setup using a custom UI. Part of the setup is the creation of a Self-Signed Certificate and its usage in a Single Sign-On Setting....
0
votes
0answers
12 views

Unable to deploy platform events from one sandbox to other

Trying to deploy platform events from one sandbox to another using jenkins. On plat form event we have trigger as well. While deploying it is throwing following error even though the package version ...
0
votes
0answers
17 views

Display fields from Pagelayout in VF Page

Requirement is like, we need to create a VF Page which should display all the fields from Account - Account Layout. So in future if any field is added to this page layout should reflect the same in ...
1
vote
1answer
39 views

Updating Custom Metadata Type's Field value via Apex

I'm trying to update a Custom Metadata Type's Field value via Apex. I'm building an Account Assignment Round Robin tool, the Tool calls on the Custom Meta Data Type to get the Value of the position ...
0
votes
1answer
23 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 ...
1
vote
1answer
40 views

How to remove fieldPermissions from Profile via metadata API

We manage to create new fieldPermissions by calling updateMetadata() and passing to it a Profile object with the new fieldPermissions. However, we haven't figured out a way to remove specific ...
0
votes
1answer
31 views

Custom knowledge base: Need your views

I am working on creating custom knowledge base for one of my client. They don't want to use "Knowledge User License". I can see if we don't give "Knowledge User License" along with "Manage Article" ...
0
votes
1answer
32 views

SFDX sfdx:force:source:deploy fail with objectTranslations

I have renamed standard object for accounts and deploying to another sandbox failed with error below. Expected metadata file with '-meta.xml' extension at path: C:\tech\app\xxx\force-app\main\default\...
3
votes
0answers
47 views

Standard User with “Modify Metadata” fails to create active Picklist Value

What is failing here perfectly works for a SysAdmin user. I have a StandardUser with a permission set which grants him ModifyMetadata and calling this code creates the Picklist Value but leaves it ...
11
votes
2answers
169 views

How to trigger Authentification of Named Credential created via Apex

I use the Metadata API and the Apex wrapper to create an AuthProvider and NamedCredential after the installation of my managed package app. MetadataService.NamedCredential cred = new MetadataService....
0
votes
1answer
49 views

Can I retrieve an Email Alert via the Ant Migration Tool?

I wanted to retrieve an Email Alert via the Ant Migration Tool. However, I could not find it in a Metadata Types Reference. I suppose it's hidden under some other name like many other SF Metadata ...
2
votes
1answer
78 views

New Picklist Values added via Metadata API stay inactive

I am using the Metadata API wrapper from https://github.com/financialforcedev/apex-mdapi to dynamically add picklist values to an existing field. @Future(Callout=true) private static void ...
2
votes
0answers
24 views

SFDX - force:source:convert command not including label, sharingmodel, name in CustomObject

I only want to deploy a new CustomField to my Sandbox org. My initial package.xml is using the CustomField metadata type to pull my new field from my development organization. However, when I ...
3
votes
0answers
23 views

Is “Case Record Type” in “Email-to-Case” supported by the metadata API?

In the Salesforce org UI, there is the option of setting the Case Record Type in the Case settings. Here is a screenshot of it being set to the Inquiry Record Type: Is this setting supported by the ...
0
votes
2answers
49 views

Retrieving all fields from Account and Case

How do I generate a package.xml of all the metadata (fields,permissions,profiles users etc') of Account and Case objects from Production/Sandbox ? My goal is to push it to a scratch org using sfdx. ...
0
votes
1answer
19 views

Missing Label attribute from CustomObject metadata

We've been working with the Metadata API and keep running into an issue whenever we get sObject details either directly via retrieving a package.xml or even by describing the org through the ...
2
votes
1answer
45 views

Is there a way to split the metadata to custom folders?

Our org have a huge legacy code base, thousands of classes, VF pages, Lightning pages etc. We experience a problem that new developers don't know about generic classes and helpers that could be used ...
0
votes
0answers
13 views

Payload error while deploy Address settings (State & Country picklists) [duplicate]

Using Workbench i have retrieved the Address setting using package.xml XML : <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <...
0
votes
0answers
36 views

Summer 19 Task List Views breaking deployment [duplicate]

After the Summer 19 release our deployment is breaking on newly introduced Task List Views The errors are below: Has anyone else faced this problem? We do not have lightning enabled in any of our ...
4
votes
1answer
435 views

Is anyone getting deployment issues with Task object? New list views from 46 causing errors

When I'm trying to deploy the native Task object to another sandbox, I am getting errors: objects/Task.object (Task.CompletedTasks) -- Error: Value too long for field: Name maximum length is:40 (...
0
votes
0answers
21 views

Not able to deploy Account search layout

I have added the below tags in the account object but still i am not able to see the account search layout in my target org. I have made the changes to the account search layout in my source org and ...
1
vote
1answer
49 views

nameField encrypted metadata not deploying correctly

We have enabled platform encryption and are deploying the <encrypted> tags for standard and custom fields on objects. However we are seeing an issue when trying to deploy for <nameField>. ...
1
vote
1answer
33 views

Metadata API - FSC Retail Banking from being set as the default App instead of my custom App

I am having an issue where, using the Metadata API, I can't get my custom app to be the default App after installing the FinServ managed package. I first am deploying my custom App and setting the ...
2
votes
2answers
28 views

How can i mass update NamedCredentials?

I need to update endpoint for 50 records on NamedCredential object. I tried different scenarios but nothing seems to be working.. 1 - Endpoint is not allowed to filter in SOQL and NamedCredential is ...
0
votes
1answer
62 views

How to set the externalSharingModel for managed package objects using automation?

Related to System.runAs for CspLitePortal Profile Users recently started returning no rows, I am now wondering how to automate the setting of the external sharing model for some SObjects contained in ...
0
votes
1answer
80 views

Using SFDX to retrieve the report meta data

I need to check if a field is being used in any of the reports in the org. So I created a sandbox environment and created a manifest project in VScode; then authorized the sandbox org and ran the ...
6
votes
1answer
142 views

Email Service via Metadata API fails to create from Managed Package

As Email Services can't be packaged in a Managed Package, I allow subscribers to create it after the installation. The code which works in my packaging org fails in productions orgs with: An Apex ...
0
votes
1answer
45 views

Access Pagelayout assigned for a profile for a object using metadata api

I need to access the PageLayout NAME assigned for logged in user for a given Object or Record Id. This details needs to be fetched in Lightning component. I think due to security restrictions, ...
0
votes
0answers
25 views

How to deploy report and dashboard folders with sharing to non scratch orgs

Can deploy dashboard and report folders using push:pull to scratch orgs, but when using source:deploy to a non scratch org getting "Error parsing flie Element (path to folder file meta.xml) on all ...
7
votes
1answer
70 views

Is this possible to rename a field using Tooling API or Ant Migration Tool or SFDX CLI?

I have tried to run renameMetadata call from Ant Migration Tool <target name="1. Rename field on Sandbox"> <sf:renameMetadata username="${sf.Sandbox.username}" password="${...
1
vote
1answer
33 views

Bulkify the Tooling/Metadata API

Came across various articles and I couldn't find approach for bulkyfying the Tooling/metadata API. In this post, the most voted answer handles one request at a time. However what I am trying to ...
2
votes
1answer
59 views

Retrieve all Custom Metadata for a single type [duplicate]

Is it possible to somehow retrieve all metadata for a single custom metadata type via ant or sfdx mdapi ? I've tried this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package ...
0
votes
1answer
54 views

How to activate a Process Builder inside a managed package

I have a managed package which ships with a template process builder which is inactive. I am trying to find a way to activate this process builder via the metadata API. Activating it via the UI is ...
2
votes
1answer
77 views

How to mass-deactivate 700 picklist values

I am looking for a way to deactivate 700 picklist values (not manually) I do NOT want to delete the values, only deactivate them I am trying with ant migration tool with this package.xml: <?xml ...