Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
19 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
42 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
29 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
22 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
27 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
25 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
117 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
39 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
11 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
61 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
29 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
45 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
22 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
44 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 ...
1
vote
0answers
22 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 ...
0
votes
0answers
28 views

SFDX deploy reporting subfolders

I am trying to deploy some reports using sfdx. However when I perform the deployment the report folders all sit as top level report folders and my subfolders do not appear as expected. My path is as ...
0
votes
0answers
11 views

Uploading Self Signed Cert Through MetaData SOAP

I am trying to understand the right way to format a SOAP POST in order to upload a self-signed certificate into a scratch org. Based on here: https://developer.salesforce.com/docs/atlas.en-us....
0
votes
0answers
24 views

How to assign record type to dependent picklist(from global picklist) in APEX

I have global picklist 'Country' In my Address object i have picklist 'Country' which was created as a dependent picklist from globalpicklist. Can we assign existing custom record type to this ...
0
votes
0answers
35 views

Salesforce MetaData API Community Deployment Error - Not available for deploy for this organization

While we are deploying lightning community from one sandbox to another through Metadata API then getting below error, can anyone help on this. Community is already enabled in sandbox where we are ...
0
votes
1answer
24 views

How to fetch Declarative Metadata i.e. meta.xml file with Tooling API query?

Is there a way to fetch the meta.xml file via tooling api query? The meta.xml looks like this for apex class: <?xml version="1.0" encoding="UTF-8"?> <ApexClass xmlns="http://soap.sforce.com/...
1
vote
2answers
114 views

How to deploy a lightning community alongwith its standard pages between orgs

We have a lightning community that is made up of standard pages(Blank standard pages). I want to deploy this community along with all its properties(most importantly pages) from one sandbox to other. ...
1
vote
1answer
26 views

User settings (Default Recordtype) in Apex

is it possible to find out in apex, if the user selected a recordtype as a default in the user settings?
0
votes
0answers
39 views

Adding Picklist values in custom Picklist using xml

currently im trying to add values to a custom picklist we are using. Currently, after multiple days of trying, im able to create a new custom picklist like this: url2 = "https://telinform--TK20170328....
0
votes
0answers
10 views

Does metadata export include all reports?

I've just finished doing a metadata import of reports to replace references to an old, poorly-designed field with a newer version. However I've read in various places that reports which are in private ...
2
votes
2answers
132 views

Unable to deploy metadata from Partner Developer scratch org because of extra fields

As I hoped for higher limits I created my scratch org as a "Partner Developer" org. { "orgName":"myns", "edition":"Partner Developer", "features":[ "CascadeDelete", "DebugApex", "...
0
votes
1answer
23 views

Attempt to de-reference null object

I am trying to insert queues using metadata api but getting error while inserting sobject in the queue. MetadataService.QueueSobject obj =new MetadataService.QueueSobject(); obj.sobjectType='Account';...
1
vote
1answer
32 views

Version conflict when deploying translations including FlowDefinition tags v44.0 & above

Since API Version 44.0 Salesforce has updated the wayflow deployment should be handled: In API version 44.0, we recommend upgrading your flows to flow metadata file names without version numbers and ...
2
votes
0answers
22 views

How do I initiate a call-out on metadata deployment?

Overview I would like to communicate with my team when I've deployed a change to production. For context, let's say I'm just need to make an outbound API call to my team's Slack channel, but please ...
0
votes
0answers
15 views

REST call for ApprovaProcess and ApprovalEntryCriteria not working

I posted a question about this some days ago. I'm trying to retrieve ApprovalEntryCriteria for an specific ApprovalProcess via metadata REST call: /services/data/v44.0/metadata/salesforce/types/...
0
votes
0answers
22 views

deployment metadata error after retrieve without doing changes

I have retrieved using the mdapi all the layouts that I have inside Salesforce, without doing any modification I tried to deploy in the same org and surprisingly for me the deployment fails in three ...
1
vote
1answer
43 views

'Error: duplicate value found: unknown' error on page layouts with recordId

I'm getting this infamous error. I've read through some posts but I have'nt seen any get it from a page layout. Also most don't get an ID in their error message I do: layouts/Opportunity-FS Renewal ...
7
votes
1answer
109 views

Why is there a big difference in profiles returned by “sfdx force:source:pull” and “sfdx force:mdapi:retrieve”?

I have a project with a scratch org created using some profiles that date from the MDAPI days. The profiles look good in the org. Having added some record types, I expected: sfdx force:source:pull ...
0
votes
0answers
54 views

JSForce - Updating picklist value API names

I'm trying to automate with JSForce a manual step which consists on renaming the API name of some pick-list values but doesn't look like it's possible. Tried update with conn.metadata.update('...
4
votes
1answer
126 views

How can I get a list of the current changeset names?

It is possible using the details from Salesforce Metadata Api/ Tooling Api to build changesets to retrieve and modify the contents of a change set via the Metadata API. However, the whole process ...
2
votes
0answers
177 views

visualforcePage.getContent() : Maximum redirects (100) exceeded

We are having utility class where we are fetching session Id using visualforcePage.getContent() which we are further using in updating custom metadata records. we released our last version around ...
0
votes
1answer
57 views

How to get a list of all custom fields in an org?

I want to get an overview of all custom fields I have in an org. I don't want to see them just for a single object - I want so see them all "at once" (for the whole org). Also it would be neat if I ...
0
votes
1answer
38 views

Find how many System.Debug lines are there in sandbox environment?

I want to find how many System.Debug lines are there in sandbox environment. As System.Debug statment is Consider in Apex character limit count. So Is there any tool or any method such as Tooling ...
1
vote
1answer
35 views

Exclude managed fields from profiles when retrieving metadata

In our Salesforce implementation we installed several managed packages. We have also set up a CI process using jenkins+git to allow us to quickly deploy our changes to the next environment. Recently ...
13
votes
1answer
319 views

Metadata API deployments are failing in Spring '19

For some time now (several years) I've been deploying changes to Apex classes using the Metadata API deploy web method with an associated zip file containing the metadata and package.xml file. This ...
1
vote
1answer
127 views

How to access existing custom fields from SFDX-managed unlocked package?

Long ago, I added a field Type__c to Contact on our production org. Now, I'm using SFDX to develop an unlocked package with code that refers to that custom field, like someContact.Type__c = 'Student'. ...
-1
votes
1answer
36 views

Deploy files from one Org to Another [closed]

I have an object that has a 'Files' list in the 'Related' tab and have attached a Microsoft Word document to that list in my testing org. Is it possible to deploy that file so I don't have to manually ...
0
votes
1answer
11 views

How to provide access dynamically to different profiles for a single web page in visualforce?

For a sample VF page, if depending upon certain logic we want to change visibility of a page for profiles dynamically, how can we do that ? Example - Profile1, Profile2 ....Profile5 have access to VF1....
1
vote
2answers
43 views

FLS info at User Level

I want a sheet for Field Access which User might have got through Profile or permission Set; Also wants to see if for the field user has access to is available on page layout and not restricted ...
1
vote
2answers
44 views

Update fieldPermissions with metadata api of Salesforce

I try to update the permissions on a field created from the API so that it is visible and usable. so I do this via the salesforce metadata API. responses = client.call(:update_metadata, message_tag: ...
0
votes
1answer
33 views

Can we run any post install script after deploying source code to an Org using Salesforce CLI

I'm deploying the source code using sfdx force:mdapi:deploy command. Is there a way to specify to execute any post-install script after the deployment gets completed. One alternative I was thinking of ...
1
vote
1answer
85 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
1answer
18 views

Updating Report's destination folder using Metadata API

I have a use case where if someone creates Reports and accidently saves it in the Public Reports folder ( in lightning ), that report needs to be saved in his Private Reports folder.This is done to ...
0
votes
1answer
171 views

Setting Picklist values dependency using metadata api

I have created two picklist values using metadata api and able to insert the values in the both the picklists, but I have to set the dependency between them, like one is controlling and other would be ...
3
votes
0answers
20 views

Password policies remain after deleting profile?

I deleted a profile via the Metadata API, and it did not delete its associated password policies. I cannot find the policies anywhere in the UI, but when I pull from production (or any sandbox ...
1
vote
0answers
30 views

MetadataService in apex overriding the IP ranges on Profile instead of adding the new onces

I have requirement to update ProfileLoginIpRange on the profile. Lets say there are 5 IP ranges already added on the profile and I want to add 1 more to it. Code Used, MetadataService.MetadataPort ...