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

Manipulate packaged flow using Apex

In my Managed Package I have a Flow template which subscriber can clone/reuse and customize to their needs. I now want to provide a bite more guidance on such a customization and relate a packaged ...
0
votes
2answers
777 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.
4
votes
1answer
47 views

Solving error about NavigationLinkSet when packaging a community using 2GP

In a Community that I am trying to package using 2GP with: sfdx force:package:version:create after eliminating several errors I am now getting this one: These entities are not supported: [...
2
votes
2answers
772 views

Is there a way to query sandbox configuration info? (e.g. Location, sandbox name, etc)

I would like to be able to query the Sandbox configuration data. For example, if you go to the "Sandboxes" link in the setup of your production org, I want to be able to query that info (Name, Type, ...
0
votes
1answer
409 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\...
0
votes
1answer
14 views

Access Aggregated Field Level Security for Offline-first App

We are currently building a page layout renderer for an offline application that would allow end-user to create records and then sync the data once they get access to internet again. We need to ...
2
votes
1answer
510 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
1answer
55 views

How to use metadata API in lightning web component

I am pretty new to metadata API, I wonder how can I use metadata API to push some JSON metadata just like in jsForce(I successfully use jsForce in this way below in my local web app, but I am not sure ...
3
votes
2answers
45 views

Can we still use SiteDotCom metadata after enabling ExperienceBundle?

We've activated ExperienceBundle metadata for communities. However, there's a known issue with it that is preventing us from actually being able to deploy using that metadata. In order to avoid having ...
2
votes
1answer
2k views

metadata api : INVALID_SESSION_ID:

To update a picklist value I'm referring to the metadataclass.cls I'm calling a class method (as like in metadadataclass example) to update the picklist value via a trigger (class method set to @...
5
votes
1answer
956 views

How to retrieve connected app using metadata API?

I have created connected App using metadata API,Now I have to retrieve connected App's Information using metadata API,The code is working fine for the Apps which is created manually but not for the ...
2
votes
1answer
31 views

Retrieve past deployments

Is there any way (using Metadata API or other options) to retrieve all successful deployments to an org from the past, say, 6 months?
1
vote
1answer
795 views

Package Install API - Remote Site Settings

When installing a package using the links it asks the user to confirm the addition of remote site settings. When installing a package via the Metadata API using createMetadata() or the packaging API ...
3
votes
1answer
155 views

Metadata Deploy and Push fails on Flexipage componentInstances in API 49 (Summer 20)

I'm having a problem deploying metadata after having updated my project to Summer 20 and pushing the project contents to a Summer 20 org. There are several failures seemingly related to a FlexiPage ...
0
votes
1answer
451 views

Issue with Updating Pick list Values through Metadata API in Apex Class

What I have done : Installed repository from GIT HUB In my Personal org https://githubsfdeploy.herokuapp.com/app/githubdeploy/financialforcedev/apex-mdapi Created a custom controller and method : ...
3
votes
2answers
460 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 ...
0
votes
1answer
496 views

Metadata API Accessing parentRole for a Role

I'm trying to add roles to Stash for my company. I created a package.xml (listed below) to get the roles. According to Metadata API Developer Guide: Role, there is a parentRole field which I'm not ...
2
votes
1answer
6k views

How should my package.xml look like to retrieve EVERY object with its fields?

I'm trying to build the package.xml in order to retrieve every single object with all its retriavable fields (I am aware that some fields cannot be retrieved), but I can't seem to achieve it. When I ...
1
vote
1answer
24 views

How to delete bulk certs from org

I have production data in my sandbox i don't want the production certs in my sandbox i would like delete certs in a bulk using apex or workbench or any other tool?
2
votes
1answer
55 views

Script Too Large Error While Generating Apex Classes Using Metadata WSDL

While trying to Generate MetadataService classes using the standard Metadata API WSDL from Salesforce, classes I got below error. I think it is related to the length of the Apex class as the lines of ...
1
vote
0answers
61 views

Unable to deploy List of Metadata fields to Layout by apex

When i deploy Layout with 1 field everything works fine whereas when i deploy fields as list, not even single field is showing in the Layout. Below is the code i am using for field creation, then ...
0
votes
0answers
31 views

How to migrate Named Credential profile access [duplicate]

To authenticate a named credential as a user in the org, ones profile has to have access to the named credential. This is done in the profile setup under the related list "Enabled Named Credential ...
0
votes
1answer
15 views

Permission Import Leads depends on permission(s): Create Lead, Edit Lead - MetaData Deploy Error

Using workbench to deploy updates to a profile and I am into the following error message: Permission Import Leads depends on permission(s): Create Lead, Edit Lead However, Import Leads ...
0
votes
1answer
20 views

How can we deploy custom My Domain name via metadata API?

Is there a way to deploy custom My Domain in Metadata API deployment using SFDX CLI?
4
votes
3answers
984 views

Enabling Enhanced Notes in scratch org

I have a package that I'd like to develop using Salesforce DX and whose functionality includes inserting ContentNote objects. Since my scratch orgs by default do not have the enhanced note feature ...
6
votes
2answers
394 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
1k views

Is it possible to retrieve Profiles using Salesforce CLI?

I've created a custom profile in a scratch org using Salesforce CLI. The thing is that by using either sfdx force:mdapi:retrieve or sfdx force:source:pull commands, only the Admin profile is ...
1
vote
1answer
34 views

Are lightning component visibility filters deployable? Where can I find them in metadata?

I have some custom lightning components on the layout. These components have some visibility filters. I need to add and remove some filters. It is easy to do it in UI in page layout settings, but is ...
1
vote
0answers
27 views

How to programmatically update picklist fullName value in the same deployment without getting a “duplicate label” error?

I have the following code: <?xml version="1.0" encoding="UTF-8"?> <CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> <fullName>Some_Custom_Field__c</fullName> ...
0
votes
0answers
24 views

CspTrustedSite created with MetadataAPI can't be retrieved again

For creating a CspTrustedSite the following is done: MetadataService.CspTrustedSite csp = new MetadataService.CspTrustedSite(); csp.fullName = FULL_NAME; csp.isActive = true; csp.endpointUrl = ...
3
votes
0answers
93 views

Creating a custom ManagedContentType in a SFDX Project

I'm trying to understand the best place in my SFDX project to place the file for a custom ManagedContentType. I tried to place this file in the location force-app\main\default\managedContentTypes/...
5
votes
0answers
64 views

How can I find the relationship between MetadataComponentId and the expected name for the Metadata API?

I've been using the Dependency API to try to retrieve all dependencies for a given metadata. I would like to get a list of dependencies, and then retrieve these with the Metadata API. Unfortunately, ...
2
votes
0answers
14 views

What is the Metadata API name for Knowledge Setting “Enable list of cases linked to an article in Salesforce Classic (Classic Only)”?

Does anyone know the Metadata API setting for "Enable list of cases linked to an article in Salesforce Classic (Classic Only)" under Knowledge Settings? I can not find it under https://developer....
4
votes
3answers
2k views

Retrieve Page Layouts in Source Format

How can I get all page layouts from an org in Source Format? Some things I've tried # Retrieve $ sfdx force:source:retrieve -m "Layout" $ sfdx force:source:retrieve -m "Layout:My_Object__c" $ sfdx ...
3
votes
1answer
65 views

sfdx is removing metadata from permission sets when changing read/write to false

I updated some permissions sets in my package and change some field-level security access to read/write false for some objects. When I run sfdx force:source:pull instead of marking the XML as <...
1
vote
0answers
14 views

Serialize Workflow object to XML

I'm developing a test application that modifies the workflow by reading the retrieved Workflow files that are downloaded. The files are read, the workflow switch is modified and submitted to Metadata ...
2
votes
2answers
345 views

How do I migrate Process Automation Settings -> Enable record locking and unlocking using ANT Migration Tool or ChangeSet or Metadata API

How do I migrate setting Process Automation Settings -> Enable record locking and unlocking using ANT Migration Tool or ChangeSet or Metadata API? We need to migrate checkbox checked in settings ...
1
vote
1answer
119 views

Creating Trigger using MetadataService Class

Hi am creating apex trigger using MetaData Service class but i am getting this Exception - Line: 13432, Column: 1 System.CalloutException: Web service callout failed: WebService returned a SOAP ...
4
votes
1answer
73 views

Dynamically create TopicsForObjects metadata from Apex

Whenever I am unable to package a certain metadata type in a Managed Page I created them from a Setup page after installation using the Metadata API and this neat Apex Wrapper lib. But this time I ...
0
votes
0answers
10 views

Updating Picklist values in RecordTypes through Mule

I am trying to update the Picklist values availables for a Recordtype using Mule. I already manage to update the picklist values inside the GlobalValueSet, but I can't make it update the RecordType ...
0
votes
1answer
416 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
1answer
395 views

Delete fieldset using Tooling/Metadata API (JSforce)

Tried this using the following 2 snippets; both failed. Snippet 1 conn.tooling.sobject('FieldSet') .delete({ DeveloperName: fieldsetName }, function(err, meta) { if (err) console....
1
vote
0answers
21 views

Import CA-Signed Certificate from One Org into Another via MetadataAPI

I am trying to automate the set up of some of my lower sandboxes. In my SandboxPostCopy class, I'm using the FinancialForce MetadataAPI wrapper MetadataService to query and upsert a certificate. (...
0
votes
0answers
18 views

Issue updating Search Layout columns via API

I'm trying to update Default Layout columns under Search Layouts for a custom object. I used Visual Studio Code, created a feature branch, made my changes in the custom object's xml file. We have a CI/...
1
vote
0answers
18 views

Programmatically “Edit Policies” of packaged Connected App in Subscriber org

My managed package contains a Connected App. Until now subscriber admins needed to perform many error-prone configuration steps after installation in Setup > Manage Connected apps > connected ...
-1
votes
1answer
23 views

need to add where clause in Rest API Get request in apex

/services/data/v39.0/query/?q=SELECT+Id,Name,AccountNumber,Type+FROM+Account+limit+10 i need to add where clause here LiKE :- /services/data/v39.0/query/?q=SELECT+Id,Name,AccountNumber,Type+FROM+...
0
votes
1answer
440 views

Apex class with namespace deploy via Metadata API

I want to deploy using metadata API. I have class classes/MyPackage__UninstallClass.cls with MyPackage namespace classes/MyPackage2__UninstallClass.cls with MyPackage2 namespace. But when I try to ...
0
votes
1answer
41 views

System.CalloutException: INVALID_TYPE: This type of object is not available for this organization on metadata API [closed]

I am working on the Metadata API to create an Apex trigger dynamically. I have used Apex Wrapper Salesforce Metadata API from Github- https://github.com/financialforcedev/apex-mdapi. The error is- ...
1
vote
1answer
16 views

XML format for IP Ranges in Security Settings

I'm trying to use sfdx for source based development. Trying to define the range of whitelisted IPs in Security.settings-meta.xml. When I push my code to my org I get an error: Error force-app/main/...
0
votes
1answer
27 views

Is there any straight forward way to query WorkFlow rules by the Object type?

As far as I know, we can retrieve the WorkFlow rules by calling the metadata API. But my question here is, can we retrieve the WorkFlow rules by the object type. This is just to check how many ...

1
2 3 4 5
20