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
1
vote
0answers
36 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. ...
2
votes
0answers
19 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
15 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
36 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
21 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
23 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
22 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
23 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
14 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
17 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
29 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
46 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
208 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
22 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
43 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
38 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
152 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
40 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
42 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
22 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
52 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
23 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
28 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
54 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
30 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
72 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
103 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
43 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
23 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
45 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
29 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 ...
3
votes
0answers
33 views

Is it possible to activate specific version of process builder(or flow) through API?

For the situation shown in the above picture, is it possible to activate a specific version of process builder(or flow) through API?
1
vote
1answer
257 views

Community Error When Deploying Via MetadataApi

I created a community in the target org which has the same name as the community in the source org. I retrieved and deployed the metadata from the source org to the target org using Metadata API ...
3
votes
1answer
94 views

Programmatically running “Quick Deploy”

After successfully completing a checkOnly deployment, is it possible to programmatically run the "Quick Deploy" action? Example: sfdx force:mdapi:deploy -d dist/my-pkg -w 5000 -c I don't see ...
0
votes
1answer
42 views

Unable to push Animation rule from Scratch org to Developer Edition Org

I am trying to complete App Builder Maintenance trailhead for Summer 19. However, I don't want to make change manually in the target organization since this is not interesting. Instead, I am ...
1
vote
1answer
21 views

Making additional (custom) metadata available for a field

I am looking for a way to add additional metadata to object fields for use by some Salesforce and non-Salesforce UI code. What I need is a small piece of custom JSON per field. (Yes I could create a ...
0
votes
1answer
35 views

Where to find list of standard metadata types supported?

Where to find list of custom metadata types to deploy/retrieve that are supported? For example: CustomObject
0
votes
1answer
85 views

Using Access Token as MetadataService sessionid

I am using MetadataService from LWC and since I don't get the session id in Lightning context, I am doing preauthorizing the org and getting the access token and storing it in a custom object. However,...
0
votes
1answer
23 views

Metadata language

I have a simple question. I was wondering what determines the language of the metadata that is being retrieved. For example, let's say I have org 1 where when I retrieve all of its layouts I see ...
2
votes
1answer
143 views

“Metadata Through Metadata API Functions” permission Not Working

I want to make a permission set such that a user only has Metadata Access and preferably only Read-Only Metadata access through Ant. The idea is I want to make a "Backup Metadata" user. I do not want ...
0
votes
0answers
20 views

Generate package.xml using Metadata API before submitting a retrieve call

I am submitting a retrieve call using Metadata API retrieveRequest(package). Before submitting the retrieve request, I need to generate the package.xml file for debug purposes. I can see that the ...
1
vote
0answers
16 views

Metadata Translation API: REST Request URL [duplicate]

I am trying to retrieve the translation for a custom picklist values , using REST I think i need to retrieve CustomObjectTranslation : https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/...
0
votes
1answer
78 views

Searching Salesforce metadata using Visual Studio Code

Is it possible to do key word metadata search using the Visual Studio Code Extensions similarly to Force IDE with Eclipse?
4
votes
1answer
35 views

Destroy PushNotification in CustomApplication with Metadata API

Good morning, I've been trying to delete PushNotification setup for a CustomApplication with the Metadata API (version 46.0 ) but although the answer is successful the changes are not done in my ...
0
votes
1answer
59 views

Custom setting deployment

I have a custom setting called CAT_Custom into which i have a URL field called CAT_URL. I have different values for this URL field in both PROD and in STAGE environments. Now when i deploy this ...
4
votes
2answers
327 views

Activate Communities Settings: “Allow using standard external profiles for self-registration and user creation.” in a scratch org config file

Since Winter20, we have some test classes failing because of new Community Setting Allow using standard external profiles for self-registration and user creation. The problem is that we have ...
3
votes
1answer
105 views

Classifying metadata into destructiveChangesPre.xml vs destructiveChangesPost.xml

I understand how both destructiveChangesPre.xml & destructiveChangesPost.xml work, but I'm wondering if it's possible to algorithmically classify metadata deletions between the two (theoretically; ...
0
votes
1answer
47 views

Metadata API to create fields

I saw the following example in the Salesforce Docs for creating fields using the metadata api: My question is - How does the system know to create a field on the account standard object? I cannot find ...

1 2 3 4 5 19