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
6 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 ...
0
votes
0answers
15 views

how to migrate filters

I have created too many filters on account object (under list view and filter catogory), wondering how to move it using change sets to another org, i tried to look for this in XML package too but ...
1
vote
1answer
29 views

Why can't I deploy a Process Builder referencing a Custom Metadata in a Formula?

I created a Process Builder in which I reference a Custom Metadata from a Formula inside of the "Update Record" action. It works fine on a Environment 1, but I have trouble with deploying it to ...
0
votes
1answer
25 views

How to import MetaDataAPI to my SalesForce project?

I want to Update Picklist Values in a standard field in my project every X time. in my Apex Classes I was writing that function: I search for this error and figure out that I need to import ...
0
votes
1answer
14 views

Metadata API CRUD - Create Custom Object SOAP

I am trying to create a CustomObject using the WSDL metadata API. I'm getting this error Element {http://soap.sforce.com/2006/04/metadata}type invalid at this location in type CustomObject when I run ...
0
votes
1answer
23 views

How to retrieve Data Category Group Visibility on Profiles, Permission Sets and Roles?

Data category visibility can be set with roles, permission sets, or profiles. I'm not able to retrieve any of these settings. This is the Knowledge relevant part of my package.xml: <?xml version="...
2
votes
1answer
128 views

Why does VS Code's Org Browser retrieves metadata with different file extensions than Metadata API and what are possible consequences of that?

Let's say I have a Custom Metadata created on my Org: MyCustomMetadata. Downloading its record within Org Browser: Command used: sfdx force:source:retrieve -m CustomMetadata:MyCustomMetadata....
3
votes
2answers
60 views

How to deactivate a existing active process builder using metadata API?

Background: There is only one version of the process builder exists in sandbox, version number is 1 and it is Active. I retrieved this process builder using the command sfdx force:source:retrieve --...
0
votes
2answers
77 views

How to deploy/retrieve ManagedContentType metadata?

I tried to use package.xml in Visual Studio Code, when I retrieve it, it give me the error in the screen shot. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package xmlns="http://...
0
votes
0answers
18 views

How to retrieve package.xml with permission sets with ALL FIELDS even those without Read Access?

So I would love to retrieve package with permissions sets but also with fields that are not currently set to 'Read Access-> true' So yeah basically metadataAPI does not retrieve uneradable fields.. ...
0
votes
1answer
37 views

Unknown type name 'SurveySettings' specified in package.xml

I have retrieved source with a package.xml which includes following segment <types> <members>*</members> <name>Settings</name> </types> <version>...
1
vote
1answer
22 views

Cannot retrieve WorkflowAlert, WorkflowFieldUpdate, WorkflowRule from package.xml through sfdx cmd

I want to retrieve all my WorkflowAlert, WorkflowFieldUpdate, WorkflowRule from my sandbox and deploy them to another one. Here is my package.xml file : <?xml version="1.0" encoding="UTF-8" ...
1
vote
1answer
32 views

source:convert command fails with error “The ”path“ argument must be of type string. Received type object”

sfdx force:source:convert --sourcepath force-app -d deployment ERROR running force:source:convert: The "path" argument must be of type string. Received type object What am I doing wrong here? ...
0
votes
0answers
11 views

How to allow guest users to use the prechat snap in a community?

How to allow guest users to use the prechat snap in a community? When I preview the community as an authenticated user I am able to see when an agent is online and utilize the prechat snap in. When I ...
1
vote
2answers
27 views

What does ConnectedApp -> oauthConfig -> idTokenConfig represent?

Within the ConnectedApp Metadata API, it has a setting nested under oauthConfig called idTokenConfig, of the type ConnectedAppOauthIdToken. The ConnectedAppOauthIdToken class has five different ...
2
votes
1answer
45 views

Create custom field using Metadata api C#

I am trying to create a custom field for an existing entity like account with v48 of the Metadata api My code is: MetadataService.CustomField customField = new MetadataService.CustomField(); ...
1
vote
1answer
57 views

Easiest way to pull all metadata

I want to pull metadata from a sandbox for the purpose of finding where in code a standard field is being referenced. My plan is to pull the meta-data and then search for references to the field. ...
3
votes
0answers
78 views

How do I query a Connected App's IP Relaxation settings?

Within a connected app's manage settings page (Setup -> Managed Connected Apps, click on the Edit link next to the connected app of interest), you can see and set the OAuth Policies -> IP Relaxation ...
2
votes
0answers
23 views

Querying for Validation Rules and Workflow Rules by criteria

I'm trying to query for all Validation Rules and Workflow Rules that have a specific value in the criteria. From developer.salesforce, I see that I can query Validation Rule, but I need to filter ...
1
vote
1answer
40 views

Deploy standard field labels using Metadata API

We want to use some of Product object standard fields and just change field labels to make them more tailored for our organization. For example: Product Code -> EAN Code This can be achieved by ...
0
votes
1answer
40 views

Need help on this tooling api code .Its returning me 0 results

Just need help why is it returning 0 results. HttpRequest req = new HttpRequest(); req.setEndpoint(Url.getSalesforceBaseUrl().toExternalForm()+'/services/data/v47.0/tooling/query?q=SELECT+DurableId,...
2
votes
1answer
22 views

Can field “Version Name” in “Installed Package Detail” view be retrieved via API or SOQL?

Can field "Version Name" in "Installed Package Detail" view be retrieved via API or SOQL? So far I've checked the Publisher via SOQL and InstalledPackage via Metadata API, and have not been able to ...
1
vote
1answer
25 views

Odd behavior observed using metadata API to retrieve contact record types

I have observed some odd behavior with retrieval of contact record types. I have created three contact record types which i can see in my org and via the workbench. If i use a wild card as follows, ...
0
votes
0answers
26 views

Issue creating unlocked package version with translations (not available for deploy for this organization)

I'm trying to create an unlocked package in API v47 that contains translations (which I think should be supported in unlocked packages) but I'm getting the following error: Error force-app/main/...
3
votes
0answers
57 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/...
0
votes
0answers
24 views

How to delete (not inactivate) picklist value from metadata api wrapper

I have installed the metadata api wrapper by financialforce : https://github.com/financialforcedev/apex-mdapi Then I added some modifications into the CustomValue class in the MetadataService Apex ...
1
vote
1answer
19 views

Getting LastModifiedDate of a Component File?

There is a post from 2019 here that details obtaining a couple of fields about a Lightning Web Component. Is there a way to get that information programmatically? Could not tell if trying various ...
1
vote
0answers
19 views

Retrieve from package.xml listview

I am trying to retrieve a ListView from Event object in my sandbox but I am not able to do it. I can see it perfectly on workbench website. Sharing settings are set in "All users can see this list ...
0
votes
1answer
32 views

Adding a custom field to standard object activity [duplicate]

I would like to add a custom Date field to a standard Activity object. Lets say this date field is called 'food_expiration__c'. Looking at another question: How to create Custom Fields on Standard ...
1
vote
0answers
63 views

SFDX force:mdapi:retrieve returns different result for scratch org and dev hub for translations metadata

When running a sfdx force:mdapi:retrieve command on scratch org and dev hub, results returned are different in translation files even when my package.xml is same for both retrievals. My Package.xml ...
6
votes
1answer
241 views

How to get list list of flows accessible by a User based on Permission Sets?

In order to provide more granular and controlled access to flows, all our flows are enabled with access setting of "Override default behavior and restrict access to enabled profiles or permission sets"...
0
votes
0answers
25 views

How can I retrive the ProfilePasswordPolicies metadata using the Rest API? [duplicate]

currently, I'm using a website to collect data and then create a Salesforce Community User. For the Salesforce Community Profile, I specified the Password Policies in order to overwrite the Password ...
0
votes
1answer
44 views

Is it possible listView upsert using query

lightning:listView don't support changing list views, so I get listview name using SOQL in order to make custom list view changer. It's success, so next, I want to make custom list view creater. I ...
2
votes
1answer
54 views

Custom Help Text translation on Standard Field Metadata API

I have a custom help text on a standard field. I am able to translate the custom help text using translation workbench, however I am unable to retrieve the corresponding metadata from either a sandbox ...
3
votes
1answer
156 views

Error when trying to open/deactivate a process in Process Builder

I have a rogue process that a previous employee made in Process Builder, and which tends to mess with the workflow we've since transitioned to, and since the process doesn't even do anything important,...
0
votes
0answers
41 views

Getting null values when retrieving Flows via Apex Metadata API

When attempting to retrieve Flow-specific data via the Apex Metadata API each value in the key-value pairs is null. Here is the code: private static void getFlowMetadata(Double apiVersion, ...
2
votes
1answer
57 views

How to get compactLayouts through apex Metadata API

I am trying to get compact layouts using metatadataapi. I am using https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataServiceExamples.cls this repo to get ...
1
vote
1answer
26 views

How to Stop FLS Defaulting to Read/Write Enabled via Metadata API without Specifying fieldPermissions in Profile

I'd like to define FLS in permission sets alone and not have to maintain FLS per field in profiles. I've been surprised to find that if I do not specify in my profile that the FLS defaults to Read/...
0
votes
1answer
84 views

<message>Cannot set picklist values when a global picklist is referenced on the field.</message>

I have update dependent picklist inculde,exclude values using metadatapi apex class.how to resolve the above error // Prepare the picklist with Controlling pickList field MetadataService....
0
votes
0answers
26 views

Create Custom Tab Using MetaData Api in Salesforce

I am using the Apex Wrapper for the Salesforce Metadata API from github to create custom object and its tab. I am done with the object but not able to create tab in apex code. There is a class called ...
0
votes
2answers
30 views

Check some permission is enabled among assigned permission sets of User

I need to check if a permission is enabled among assigned permission sets of Logged in User. Lets say I have 3 permission sets named as PSet1, PSet2 and PSet3 assigned to a User. Need to find out if '...
0
votes
1answer
98 views

Generate the package.xml using a local project

I am trying to find a way to generate the package.xml using metadata stored locally on my machine without using any org. I have found a lot of alternatives when you want to generate a package.xml ...
0
votes
1answer
33 views

Find Report Type Id using Metadata API

I’ve been trying to find out if it is possible to get the id of a report type and everything I’ve found so far points to this doc: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/...
0
votes
1answer
119 views

Inserting records to ContentFolder and ContentWorkspace

Good day! I wanted to programmatically create a library. Manually in lightning mode you need to navigate to Files tab and then choose Libraries and then click the New Library button. Supply a name ...
5
votes
1answer
121 views

Is it possible to programmatically change connectedApp settings in production?

Background: I have a requirement to make it so that an SFDC connected app defaults/is super easy to set to Admin Users are Pre-authorized instead of All users may self-authorize. This setting is ...
2
votes
1answer
69 views

Is it possible to retrieve Inactive Process builder versions?

We use process builder heavily and sometimes I need to go and see what is there in the Inactive ones. I prefer downloading all flows(including Inactive) and searching in vs code. I tried the below ...
0
votes
1answer
36 views

What is the max xml file size that ANT support to retrieve and deploy the data in salesforce

I want to retrieve the metadata using ANT, have an XML file of size 2MB and total line are around 35000. When i run the command to retrieve the metadata I am facing error as max limit is 10000 files. ...
0
votes
0answers
33 views

Web service call out not allowed in test class [duplicate]

I'm trying to write a test class for below code, But it throws an error Web service call out not allowed in test class. Please help me to write a test class to below code. By using Test.setmock() I ...
1
vote
1answer
50 views

Metadata api/DX mdapi is retrieving incorrect values of lead process

I am retrieving Lead information through the metadata API and the business processes that come with it do not match what is in the org. I have verified the org I am retrieving from is correct. I also ...
0
votes
0answers
39 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 ...

1
2 3 4 5
19