Questions tagged [metadata]

Metadata contains all the customization you can do to your salesforce organisation. Use this tag for specific questions about the metadata itself. Use the metadata-api tag for questions on deploy/retrieve/update/delete of the metadata with salesforce organisations.

Filter by
Sorted by
Tagged with
16
votes
2answers
9k views

Getting Session ID in Lightning

Background I'm using Apex Wrapper Salesforce Metadata API to update some picklist values on the fly. (i.e. Every time a record is inserted/updated/deleted in Table A, I'm adding/subtracting picklist ...
19
votes
7answers
10k views

How to get a list of the managed packages (including version numbers) installed in an org?

For a continuous integration setup, I only want to install/upgrade some packages (through the new InstalledPackage mechanism) when necessary. I've looked at the Metadata WSDL (and documentation) and ...
35
votes
7answers
26k views

Copying metadata and code from one Production org to another

How do I copy(for want of a better word) metadata (i.e. Objects, Workflows, Validation rule etc), and code (Apex, Visualforce, Triggers) from one Production org to another production org? Is this ...
5
votes
4answers
413 views

IDE hangs at “Saving components to project” whenever I refresh from server

Something like 75% of the time I attempt to refresh from server on a project in the Force.com IDE it gets the data from the server but then hangs for 10 minutes or more on the "Saving components to ...
20
votes
2answers
4k views

Resetting my development org to an empty state

I would like to clear out my development org of all artefacts on a regular basis and then do a deploy of the development package from my local source. I realise there are retrieve and list tasks ...
8
votes
2answers
463 views

Finding the SObjectType from the SObjectField

As part of the implementation of an API, I would like to be able to find the SObjectType from the SObjectField: public class MyClass { // Fields are from various SObjects public void myMethod(...
2
votes
1answer
214 views

List of names of standard fields as seen in report/layout metadata

If you look at the metadata for a related list in a page layout, you might see something like this: <relatedLists> <fields>Nopulous_Gateway__c</fields> <fields>...
7
votes
11answers
3k views

Metadata comparison

Are there any service/known option to campare metadata on file system and some org and to identify what components have differencies. Is it possible to link this feature with Ci tool so it ...
11
votes
3answers
2k views

How to enable Account History Tracking in Scratch Org?

I have a project with existing metadata that requires Account History Tracking to be enabled. I can't figure out how to spin up a scratch org with this enabled (or to have it automatically turned on ...
7
votes
1answer
1k views

Customizing Package.xml for updating Sandboxes with Continuous Integration

I am setting up a continuous integration for a team development process using GitHub and Ant (and eventually Jenkins) and have a problem with deploying to dev sandboxes to keep them in sync with ...
11
votes
1answer
4k views

Issues with managed package visibility?

Question Is anyone experiencing issues with incorrect managed package apex class visibility? Suddenly unable to save a class and everything seems to be in order. What am I missing? Anyone run into ...
7
votes
1answer
6k views

Adding values to a picklist using apex

I need to dynamically add and remove values from a custom picklist using APEX code. I want this to be reflected in the picklist meta data e.g. not only appear in record details. How can I do that ...
5
votes
5answers
3k views

Tool for determining object custom field use

Is there a good tool that checks the schema to determine custom fields and their use in triggers, page layouts, classes, etc? We have a couple objects that are getting close to the 500 max and it ...
4
votes
2answers
1k views

Update layout in post install script

I'm developing an app for the appexchange containing custom visualforce pages/components. Instead of asking the user to create custom fields and edit layouts to place the vf pages after the ...
1
vote
1answer
2k views

How to Update Picklist values along with record types using metadataservice?

I have used the following code to add new picklist values to the picklist field called "Tags__c" in contact object. The code works and the new picklist values are getting created successfully but they ...
5
votes
1answer
1k views

How do i retrieve all installed packages names through API?

I am using RetrieveRequest object to retrieve packaged and unpackaged components. Part of the code is: String[] packageName = {"Salesforce for Google AdWords"}; RetrieveRequest retrieveRequest = new ...
3
votes
1answer
2k views

Get all page-layouts for an object via API

I am attempting to get all page-layouts (w/ details) for a given object via the API. Currently using describeLayout which gives me the details I would need about a layout, the problem with this is ...
3
votes
1answer
805 views

How to fetch a layout from metadata API in apex under a name prefix

Following my previous question: Updating page layout related list using metadata api Yes, after three days' headache, I am still investigating this issue. I have created a new dev org and copied ...
3
votes
1answer
1k views

Opportunity StageName metadata retrieve in API 39

I was trying to migrate some standard fields like Account Type, Opportunity Type and Opportunity StageName with Migration Tool with API version 39.0 but am i don't see any pick list values in Metadata ...
3
votes
1answer
1k views

Getting User - List View mapping using apex

Is there any table or any other way(metadata/rest api) we can query the list views of a particular object that a user/group has access. Example: SELECT Name FROM table_x WHERE UserOrGroupId = '1234....
3
votes
1answer
286 views

Identify salesforce schema changes

I am backing up Account, Leads, Opportunities and Document objects. Initial level backup is full where I download using BULK API and then incremental subsequently. If there is a change in the schema ...
1
vote
1answer
315 views

MetadataAPI: Missing MetadataPort.checkStatus(String[] asyncProcessId) in MetadataService.cls v32.0

I'm updating MetadataService.cls form a older version for v29 to the current version v32 and found some members maybe missing: MetadataPort.checkStatus(String[] asyncProcessId) MetadataPort....
17
votes
3answers
3k views

Are sandboxes slower than production Orgs?

I've noticed quite often that sandbox instances are showing a slower performance during Metadata API and Tooling API access. Today this happened on cs14. The force.com IDE froze completely during a "...
11
votes
1answer
2k views

General way to distinguish different Org types?

I need to distinguish different Org type as follows Production Org Sandbox Org Developer Org Demo Org (created by Salesforce, sometimes called SDO - or created by partners, sometimes called PDO) ...
9
votes
4answers
6k views

Are profile and permission set metadata files getting all project objectPermissions?

I have a project in development. There about 45 new SObjects to the org but there is also a couple of new profiles for the org. The permissions on several existing SObjects have been specifically ...
13
votes
0answers
638 views

Salesforce DX: How to track custom objects' changes in custom profiles?

Salesforce DX does not track some of the changes I make on my scratch org. How to reproduce a problem: Create a custom profile -> sfdx force:source:pull Create a custom object -> sfdx force:source:...
10
votes
1answer
2k views

Deploy Metadata from Non-Certified Package Versions via Apex - what does it mean

In Summer 17, there is a new checkbox in Apex Settings: Deploy Metadata from Non-Certified Package Versions via Apex. I tried to google what does certified package mean but got no luck. Does it mean ...
5
votes
1answer
1k views

Must specify a {http://www.w3.org/2001/XMLSchema-instance}type during creating Approval process using metadata API

I am trying to create Approval process using Metadata API but unable to figure out what i am missing. One doubt is XML don't have any symbol why which me or Salesforce could identify on which object ...
18
votes
2answers
2k views

Salesforce Object with _hd suffix?

I am coming across an underscore hd ( _hd ) object in my instance, Ive not noticed this before? I have a custom object called Membershi__c I also see the following to additional objects ...
8
votes
0answers
123 views

Metadata.DeployCallback is not called when deployment status is Fatal Error

BACKGROUND I am working on a feature that deploys custom metadata record. I am using a scratch org with a linked namespace. This is a my method which initiates deployment: @AuraEnabled public ...
5
votes
2answers
598 views

Updating page layout related list using metadata api

We are developing a managed package. By realizing that page layout for standard object will never be able to be pushed through package, I decide to use metadata API way, which means financialforce's ...
3
votes
2answers
3k views

Fetching picklist values based on record type

Is there any way to fetch picklist values based on a record type. I am wondering how salesforce does it. I am fetching list of record types via ForceTK, next i want to fetch picklist values based on a ...
1
vote
1answer
506 views

Failing to get useful info out of metadata api about Lead Views

I am trying to use the apex metadata api I found here: https://github.com/financialforcedev/apex-mdapi I want to get all of the filters and other properties of Lead Views. I looked at the example ...
1
vote
1answer
1k views

Force.com IDE - Deploy Entire Org. to New Org [duplicate]

Possible Duplicate: Copying metadata and code from one Production org to another Quick Question. I'm trying to deploy an entire org.'s metadata into a new one, specifically its sandbox, but ...
8
votes
2answers
7k views

Some boolean values are 0/1 and some are true/false

What are the standard values for boolean datatype? I have two columns like below in different tables. One table has values like 0 and 1 and the other table has true and false. I need this to set a ...
8
votes
3answers
526 views

Can the PackageVersions element of the metadata be automatically updated

I'm working on an application that consists of a base package and an extension package. Every time I update the base package in the development environment, I have to change the <packageVersions>...
7
votes
1answer
1k views

Can I rename API names of fields in a change set?

I have a field in two sandboxes with the same ID (they both came from production). The field is on the Opportunity Let's call them sandbox1 and sandbox2. I changed the API name of the field in ...
7
votes
2answers
3k views

How to retrieve action overrides?

Question Is there any trick to retrieving action overrides via the metadata api? Background The docs seem to indicate this is straightforward, just use object dot notation and a type of ...
6
votes
2answers
1k views

Querying Delegated Administrators

Is there a way to query a list of delegated administrators? I looked in the list of objects available to query in Force.com Explorer and can't find any objects that look like they would have this ...
6
votes
3answers
2k views

Is there any way via any API to track Metadata history?

I am using metadata API to retrieve the LastModifiedBy of an Object. But, it returns me only one User. I wanted to know if we can track, the Users whoever modified the Object. Is it possible by any ...
6
votes
1answer
6k views

Metadata API : How to get the translated values of picklists of my object

Wanna get the translated values of picklists of my object? How can I get them in Apex. I tried using Metadata APi but invain. Can anyone suggest me?
6
votes
1answer
334 views

Retrieving Packaged Page Layout in Apex

So using the spanking new meta data in Apex you can get page layout information (at last!): List<String> componentNameList = new List<String>{'Opportunity-Opportunity Layout'}; List<...
5
votes
2answers
1k views

What can be done by “DOT”? (Black Tab Feature)

I know that Salesforce has a black tab feature where they could "DOT" an Org (Copy data and metadata) to another org. What are your experiences on this? Like what were they able to do with this ...
5
votes
1answer
2k views

What is the Best Practice for the right Training Environment?

As we all know, good user trainings are crucial to ensure a high adoption rate and a successful CRM strategy. I'm hired quite regularly by customers to provide enduser trainings. Always there is the ...
4
votes
1answer
222 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 ...
4
votes
1answer
5k views

Deploying Business processes with ANT

I have tried to deploy business processes with ant. I seem to have the syntax wrong. I am seeing Entity type: 'businessProcesses' is unknown <?xml version="1.0" encoding="UTF-8"?> <Package ...
4
votes
1answer
391 views

Does Salesforce auto-replace org id references in apex code in sandboxes?

I may be taking crazy pills, but it seems like SFDC is doing a find and replace on any strings with a production org id and replacing them with the sandbox org id when creating a sandbox. I can't seem ...
3
votes
2answers
366 views

Getting null Metadata values from Tooling API

I want to view the Metadata(RecordType, VF access, Apex class access,etc.) from Profile using Tooling API. My code looks similar to this ToolingAPI toolingAPI = new ToolingAPI(); List<...
3
votes
2answers
5k views

Salesforce - Mass Update Picklist Values

I would like to mass update picklist values in a custom object from picklist values in a standard object. In the absence of universal picklists, i am having to manage a few picklists in different ...
3
votes
1answer
59 views

Deploy/Download Profile ListView

I need to deploy & download a Profile ListView, it seems typically a ListView would be included in the object's XML, but when I try to download this it gives me this error: package.xml - Can't ...