Tagged Questions

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 ...

learn more… | top users | synonyms

0
votes
0answers
3 views

Metadata API does not recognize customobjectOwnerSharingrule based on groups

I am using Salesforce Migration Tool to retrieve metadata including customobject sharing rules. For a specific custom object I have two sharing rules. One based on the users' role and the other based ...
0
votes
0answers
8 views

CustomConsoleComponents metadata not including lookup component

<customConsoleComponents> <primaryTabComponents> <containers> <region>Right</region> <sidebarComponents> ...
2
votes
1answer
13 views

Unable to update metadata (picklist values etc) after post install script is executed

Once a managed package is released, we have to perform several manual steps such as update picklist values, add field to layout, update field level security etc. And there are around 100's of ...
1
vote
1answer
16 views

Intermittent error when calling checkRetrieveStatus in metadata service, version 32.0

I recently upgraded my metadata service from version 29.0 to 32.0 and I'm having some difficulties with the checkRetrieveStatus method (new method as of version 31.0 - see quote). The code included ...
2
votes
1answer
48 views

Unit tests executed via metadata API failing on call to system.test.startTest

I have an CI system using Jenkins and the metadata API to automatically execute all unit tests in our packaging org. Some, but not all, of the unit tests have started failing at the point where the ...
3
votes
1answer
32 views

How do I distribute Record Type Assignments when packaging Permission Sets?

I'm trying to create a Managed Package that relies entirely on Permission Sets. No profiles! In my head, Profiles are really "owned" by each org administrator. One needs serious justification to ...
0
votes
0answers
19 views

Get list of all report names

I would like to obtain a list of all SalesForce reports under all folders - the ones available by default (ex - All reports under Accounts and Contact Reports folder) and also the custom reports. At ...
0
votes
1answer
52 views

FIELD_INTEGRITY_EXCEPTION Must specify a nameField of type Text or AutoNumber

when i am creating salesforce custom object in C# using salesforce metadata api i am getting following error: FIELD_INTEGRITY_EXCEPTION Must specify a nameField of type Text or AutoNumber CODE: ...
2
votes
1answer
32 views

Is it possible to create a new WorkflowRule using Metadata API?

The question is basically as in the title: Is it possible to create a new WorkflowRule using Metadata API? I'm using Java, and I want to create a workflow rule for a custom object. I've tried: * ...
0
votes
1answer
41 views

Displaying custom field description on VF page

I have a requirement where the names of the custom fields far exceed the 40 characters limit. So instead I thought I would put a keyword in the field name and the whole name in the description of the ...
1
vote
0answers
23 views

Metadata weird changed on sandbox

I am currently using mavensmate and sourcetree. For some weird reason all the files for the objects in my repository had changed, most of them are displaying the following change: and some of them ...
1
vote
1answer
33 views

Fectching validation rule for specific object

So i am trying to fetch validation rule for a specific object, is there any API call via which i can achieve the same ? Already done with fetching validation rule for all objects via ...
0
votes
0answers
39 views

Error when reading metadata: INVALID_TYPE: This type of metadata is not available for this organization

I am trying to get a list of all metadata objects with the given name. However, the code below fails: connection.readMetadata("ApexClass", new String[] {"SampleDeployClass"}); with this error: ...
1
vote
0answers
49 views

Can I get a Lead View to show converted Leads?

I am using apex code to give me all of the leads in a lead view like this: Database.QueryLocator ql = Database.getQueryLocator('select Id from Lead limit 1'); ApexPages.StandardSetController ...
2
votes
0answers
67 views

Accessing Custom Labels through Batch Apex

We have a mobile application which needs custom labels for different languages through Salesforce custom labels. Because of API limit on metadata api, we are planning to store all the required custom ...
1
vote
0answers
10 views

How to remove currency metadata from salesforce reports

Im trying to remove currency metadata from reports permanently . The intention of removing the metadata was to default display the currency in reports and dashboard according to User Currency ...
4
votes
0answers
62 views

How to tell if a field is not supported in metadata api?

I have the Order Status field in the Order.object file defined simply as follows: <fields> <fullName>Status</fullName> <picklist> <picklistValues> ...
1
vote
2answers
66 views

Can I create/update/delete metadata using APEX?

In particular, I want to create a custom field for Task for a specific unit test, then delete that field when the test is finished. I know Salesforce uses the Metadata API, but this seems designed to ...
0
votes
0answers
25 views

Salesforce Flow Metadata list / retrieve

Strange Behaviour. 1. When i perform a list operation on Flow, I get the following response. [ { "createdById": "00520000003eLmNAAU", "createdByName": "Gunish Rai Chawla", ...
0
votes
1answer
18 views

How to get a list of updated metadata objects using Metadata API?

i.e. I want to get a list of all CustomObjects, ApexClasses etc. which were updated since a given point in time. The only thing I have so far is: for (String type : types) { ListMetadataQuery q1 ...
2
votes
2answers
54 views

Metadata API, describeMetadata result and PageLayouts

I am trying my hand at building a package.xml dynamically to download everything from an salesforce org, so I started the Novel approach of getting the describeMetadata and iterating through it to ...
2
votes
1answer
35 views

Is “All Related Objects” field of an object's Feed Tracking options available in metadata?

After enabling "Publisher Actions" for Chatter, you can tick a checkbox called "All Related Objects" for a specific object in Setup > Customize > Chatter > Feed Tracking. This will turn on the ...
1
vote
1answer
184 views

Retrieve Folder Metadata using Metadata API (File based)

We are trying to retrieve zip file of metadata in Salesforce. After trying in several ways we are able to get the metadata in a zip file but, it only has "package.xml" not the folder detail file as ...
2
votes
0answers
32 views

Writing JUnit test cases for Salesforce APIs

I want to write JUnit test classes for a project involving login, creation, updation & deletion of various custom objects, fields, tabs, custom settings, etc. most of them utilizing metadata API ...
3
votes
0answers
64 views

Unable to Override Add Products on Order - Deployment Error

My co-worker overrode the Order Product's (OrderItem) Add Products related list button on the Order with a Visualforce page. He did this in the web UI without any issue. The Visualforce page is an ...
1
vote
1answer
11 views

Retrieve CustomObject Definition without its Declarative information

With the help of Metadata API we can fetch CustomObject definition easily. But somehow we need only CustomObject details not its custom fields, ListView etc. I looked in available metadata type but ...
4
votes
2answers
63 views

How does Eclipse pull metadata from Standard Objects

I want to do what Eclipse is doing: pull metadata for Standard objects. I basically need to inspect what Views, WebLinks, and Validation Rules Opportunity has in my org. For Custom objects I do the ...
1
vote
3answers
72 views

Can we replace existing picklist values using meta data API

Suppose there are three picklist values "a", "b", and "c". With the mentioned values there are records in that object. I want to replace "a" with "x" , "b" with "y" and "c" with "z". Can we do this ...
1
vote
2answers
55 views

Deployment In Chunks Using Metadata API Deploy Method

We have a big project depending on Metadata API and we are using deploying of all components at once. But now size of components have become too large (80MB) and our server can't send files with this ...
1
vote
1answer
128 views

Permanent delete Custom Objects and Custom Fields

When I'm trying to delete Custom Objects and Custom Fields via metadata Api with deleteMetadata(), they not fully deleting, but moving to Deleted Objects or Deleted Fields. Is there any way to mass ...
2
votes
1answer
63 views

Use List Metadata With Standard Fields?

Question Is there any way to retrieve the "list" details, which include the field id for standard fields? Background I'm building a report on picklist values by record type and am including links ...
3
votes
1answer
75 views

Is it possible to delete a record type through Metadata API?

I'm deploying a destructiveChanges.xml file via Force.com Migration Tool to delete some listViews, Custom Fields, and Groups. I determined we also can remove some record types from Cases. I received ...
3
votes
1answer
45 views

CustomMetadata and CustomMetadataValue in Summer 14 Metadata API

In the Summer 14 (v31.0) of the Metadata API complex types are added for CustomMetadata and CustomMetadataValue. The latter appears in the values element of the former. CustomMetadata extends ...
0
votes
0answers
36 views

Metadata API and Updating PageLayout

I am following the post "Change Page Layout of objects using Meta data API in apex" and trying to update the existing pagelayout with multiple custom fields. I am able to create a new section and ...
2
votes
1answer
54 views

Layout must contain an item for required layout field: Name

I am trying to add a custom field to layout. but it is giving me an error like "Layout must contain an item for required layout field: Name". I have already created the field ...
7
votes
1answer
227 views

Access MetadataAPI via JavaScript

We created an 100% native Salesforce IDE as a Managed Package which is using ToolingAPI and MetadataAPI via APEX. This works fine. But there is one thing which really bothers people after the ...
5
votes
1answer
63 views

How does one get a list of Documents via the Metadata API?

I need to be able to retrieve a list of Documents using the Metadata API. According to the documentation, "To retrieve the list of documents for populating package.xml with explicit names, call ...
2
votes
1answer
87 views

Version 31.0 metadata is breaking my app

I decided to switch to v31.0 metadata, needed to update some code to make it compile, but that's fine. However, now it's not working the way it used to. My code is in C#, it was used to retrieve page ...
1
vote
1answer
40 views

Metadata API error loading zip

I did an export of metadata my Account object. I uploaded the same zip to be deployed using the Metadata API. Got the following error: Parser was expecting element ...
1
vote
1answer
42 views

Can a “reference” type field reference more than one table?

Using v31.0 of the Salesforce REST API, when querying metadata for an object, if the object is of the type reference, it will have it's referenceTo field populated with the referenced table. { ...
2
votes
1answer
166 views

List of workflow rules using metadata api

I read one response from you is export all data to eclipse and then use metadata api to get list of all workflow rules. I have similar requirement where i need to pull List of workflow rules using ...
3
votes
1answer
152 views

Creating contract status picklist values with the meta data api

I'm working on a small application that uses the metadata api to make some structural changes on some default objects. One of the changes is adding some picklist values to the Contract's status field. ...
3
votes
1answer
68 views

Edit existing Visualforce Page (ApexPage) using AndrewFawcett ToolingAPI package

In APEX there is great wrapper class to access the ToolingAPI written by Andrew Fawcett https://github.com/afawcett/apex-toolingapi There are a lot of examples including one which shows how to edit ...
1
vote
1answer
49 views

Populating a Datagrid with information retrieved from a Data Extension

I used the base app generator to create an app within which I have a Fuelux Datagrid that I would like to populate with information from a data extension. I followed the sample ...
0
votes
1answer
166 views

How to use 31.0 Api Version

i have a developer org in which i can set highest version upto 30.0 .but there is a lot of upgrades in 31.0 metadata api.How can i use 31.0 api version in my apex class and pages.
0
votes
0answers
62 views

How to create Apex Class Object Of Flow Type generated From Metadata WSDL

i am using library https://github.com/financialforcedev/apex-mdapi .i used readMetadata function for getting flow objects.but this function doesn't support flow.so only option that i am left with is ...
1
vote
1answer
41 views

Detect changes in picklist values

I have an external system which keeps synchronized with Salesforce. I have triggers in every object that send the inserted/updated/deleted records to my webservice, and every minute I send the ...
0
votes
0answers
51 views

How to get Flow Object in metadata api

i am new to soap api.i know how to get file content related to an apex class MetadataService.MetadataPort service = createService(); List<String > yy = new List<String>(); ...
3
votes
2answers
96 views

Call ToolingAPI or Metadata API in APEX without adding instance url into remote site settings

I need to upgrade the metadata in post install script, for instance, upgrade the picklist values for some fields, as those values are not updatable for the existing orgs. Not matter I tried to use ...
2
votes
1answer
129 views

Update StaticResource via APEX ToolingAPI

I'm trying to update StaticResources from APEX. Currently I'm using async methods of apex-mdapi and it works good. On the other side I'm using apex-toolingapi to update ApexClasses which works even ...