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
18 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
22 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
31 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
24 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
21 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
7 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
94 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
22 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';...
0
votes
0answers
23 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
12 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
17 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
20 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 ...
8
votes
1answer
72 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
26 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
99 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 ...
1
vote
0answers
105 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
28 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
33 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
27 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 ...
14
votes
1answer
273 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
71 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
34 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
40 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
42 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
27 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
47 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
16 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
74 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
16 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
18 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 ...
1
vote
1answer
21 views

Metadata API — Creating List Views throws (FIELD_INTEGRITY_EXCEPTION) when specifying Filters or Columns

I followed instructions given in https://github.com/financialforcedev/apex-mdapi to create list views in my dev org. I am trying to create List View for Accounts. I am able to create simple list ...
2
votes
2answers
68 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 ...
0
votes
1answer
67 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 : ...
0
votes
0answers
13 views

Can we use Standard Object in Kafka Service on Heroku Platform?

Can we use standard object instead of external object and it's external data source in Kafka connect service on heroku platform ?
1
vote
1answer
29 views

Choosing API to restore an object

I've got a backup of objects such as User, Profile, etc. I wanted to restore them through the provided set of APIs. I was wondering if there is any predefined set of objects that can be restored ...
0
votes
0answers
30 views

PlatformActionList consuming API calls

I'm having trouble dealing with my API calls limit. I found that the main object that is consuming this API calls is PlatformActionList (I'm not a developer, I'm not even sure if this is an object). ...
0
votes
0answers
45 views

com.sforce.soap.metadata.QuickActionLabel problem when deploying PartnerCommunity using METADATA API

I'm trying to deploy a Community Partner in a Partial-Copy ORG, using Metadata-API and I find these errors: Problem unmarahalling NewCommunityCase.quickAction. New Community CaseNot a valid ...
0
votes
1answer
15 views

What if I want to Retrive an Custom app - what meta data type I should use

I made a custom app and I want to retrieve its metadata? How shall I do
0
votes
0answers
43 views

Unable to push files to the scratch org due to some apiversion error

I am getting an error when I try to push my files to the scratch org. Error: Flows must be used with a minimum API version of 44.0. Make sure that the sfdx-project.json file is set to use "...
0
votes
1answer
18 views

Cannot grant permission to edit Roll-up summary or formula fields

I am trying to give a profile edit access to a Formula field and Roll-up summary field, I did so with metadata like so: <fieldPermissions> <editable>true</editable> <...
0
votes
1answer
40 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
0answers
34 views

Deployment Error 'Field cannot be set for type Update a Record'

I have an automated process set up to move my code from Development to QA and when I try to move a Quick Action I am getting an error I have never seen before: 'Field cannot be set for type Update a ...
1
vote
1answer
91 views

MetaData API and Tooling API

Is it possible to get below things using Apex: I want to get field Updates that are used in a particular or all WorkFlow rule/s. I want to get Workflow rules and approval Processes that are ...
1
vote
0answers
11 views

Updating Standard Report Type via Rest API on Cases returning error: 'value \“\” is not one of the picklist choices.'

I am looking to update the report type of an existing report via REST API. First I get the report metadata via a GET/describe, then I string-replace just the report type (assuming there is just one ...
0
votes
0answers
23 views

How to create a new report programmatically and set audit fields?

I am looking to create a new report programmatically and set its audit fields (CreatedBy, CreatedDate, LastModifiedBy, LastModifiedDate). I followed this REST API Documentation to create a report ...
0
votes
1answer
33 views

Can I query Salesforce Queue and can I do it using the metadata or tooling APIs?

Can I query Salesforce Queue and can I do it using the metadata or tooling APIs? Looking to quickly access this data from Salesforce inspector, also looking to see if there is a way to check if a ...
0
votes
0answers
23 views

MIXED_DML @testSetup TestMethod [duplicate]

So I am seeing a very weird issue. I am getting a MIXED_DML error in one of my test methods. In the @testSetup annotated method, I am indeed perform a mixed dml transaction (shame on me). However, ...
0
votes
1answer
49 views

How can I retrieve LiveAgent Settings from an org?

I am using ANT to retrieve settings from a production org. I have been successful using the package file below to get LiveChatDeployment and LiveChatButton settings. <?xml version="1.0" encoding="...