Salesforce allows you to describe sObjects either by using sObject or field tokens, or the describeSObjects Schema method.

learn more… | top users | synonyms

3
votes
1answer
168 views

Get all Parent and child objects related to the current object

I have a string which contain the name of a sobject. Now I want to get all the objects related to this object. Also want to get which kind of relationship it have with these object.
2
votes
1answer
53 views

Which Objects are displayed in PermissionSet Object Settings?

I am a noob with Salesforce, please bare with my question. I am creating an App which enables easy edit/creation of PermissionSets on an ORG. In this process, I am creating a tree view with ...
3
votes
2answers
75 views

Describing the Name field of a Custom Object to get Auto Number

I want to check if the (standard) Name field of an object is an auto number field or not. This can be done by describing the field and using isAutonumber()Salesforce Documentation. I have a custom ...
0
votes
1answer
30 views

Report to identify Custom / Standard Salesforce Objects

Is there there an easy way which i can produce a Salesforce report which returns the following headers ; Singular Label Plural Label Object Name API Name Custom Desired outcome would be ; ...
0
votes
0answers
22 views

Search through metadata all fields with a specific pattern and then translate the same

There is a requirement to translate All the fields/ Objects/ Layouts that starts with a Particular Keyword say OK and replace it with DP. Currently i'm using Schema.DescribeSObjectResult to extract ...
0
votes
0answers
25 views

Custom field not showing in list of described object

I am working on an integration using JSforce to query the Salesforce API for data. When I run a describe('object'), I get a list of fields that are contained within said object, including custom ...
0
votes
1answer
118 views

Compatible Schema.DisplayType For SObject Put

I'm trying to write a method for working with sObject.put(field, value) statements in a loop where the Schema.DisplayType of the fields received varies. The goal is to have the method return the name ...
2
votes
1answer
37 views

Dynamic Schema getDescribe

I have two variables: public String selectedObject {get; set;} //selectlist public String selectedField {get; set;} //selectlist public String selectedDataType {get; set;} //text They are the ...
0
votes
0answers
72 views

Salesforce route “layouts/describe” returning {'body':null}

Our current strategy for pulling layouts is as follows: first we attempt to retrive data from the describe/layouts endpoint, here this fails (returns body.layouts of null) [ "SF makerequest end", ...
0
votes
1answer
39 views

Default value is null always,Schema.DescribeFieldResult [duplicate]

I am trying to describe a field and get the default value but the following always outputs null. Schema.DescribeFieldResult dfr = Account.SLASerialNumber__c.getDescribe(); system.debug('res ...
0
votes
0answers
32 views

Record Type Object Describe difference between detailLayoutSections and editLayoutSections

Looking at the describe back from Salesforce for an objects record type layout, there are two values returned within the object called; detailLayoutSections editLayoutSections Could anyone shed ...
2
votes
4answers
331 views

Retrieve API names of All object in Salesforce ORG using SOQL

How to write SOQL query to retrieve all the object Name and API names of Sobject in Salesforce
2
votes
1answer
51 views

MiddleName Field cannot find in in “.fields.getMap()”

We've just enabled the Middle Name and Suffix Fields feature and encountered the below issue. SUMMERY : Just after enabling "Middle Name and Suffix Fields", Implementation of custom apex logic in a ...
2
votes
1answer
107 views

How to check if field is of formula type or not in dynamic apex? [duplicate]

public static void getFieldNames(String objName){ Map <String, Schema.SObjectField> fieldMap = Schema.getGlobalDescribe() .get(objName).getDescribe().fields.getMap(); ...
0
votes
0answers
36 views

Issue with Global Describe get vs containsKey when using namespace and Execute Anon vs Apex

Ok, so a different spin here to this: Issue with GlobalDescribe Field Results and Managed Package I do not think it should be doing this... When executing via the execute anonymous in dev console: ...
1
vote
1answer
17 views

Get sObject Gender via API

Is there any way I could get the Gender of a CustomObject? I thought it would be something like tcana__Tipo_Veiculo__c.getSObjectType().getDescribe().getGender() But it didn't work
5
votes
2answers
163 views

How to differentiate LIST apart from HIERARCHY setting in Apex?

My Apex code needs to dynamically reflect on user-defined Custom Settings. But the user could use a List or Hierarchy depending on their needs, so I need to be a bit careful manipulating each type. ...
0
votes
1answer
86 views

List Knowledge Articles on Visualforce Page

I am working on KnowledgeArticleVersion and want to show the list of articles on Visual force page. SObjectType objToken = Schema.getGlobalDescribe().get('KnowledgeArticleVersion'); ...
2
votes
0answers
26 views

Javascript, Forms, and Describe

One of the advantages of using Visualforce is the magic that happens when building forms. When you use an <apex:inputField> component (particularly when in an <apex:pageBlockSection>, ...
2
votes
1answer
46 views

Is it possible to determine the visibleLines() value of a multipicklist programmatically?

For a multipicklist, the visibleLines attribute value is not available from internal Schema.DescribeFieldResult.class. Is there any other way to determine what this value is for a field ...
3
votes
1answer
96 views

Describe call inconsistent in test class

In the Apex class below (executed in a client org), testA() passes while testB() fails. The failure is an assertion error from the ServiceLayer constructor. /* SF API 33 */ /* PKG version 1.55 */ ...
2
votes
3answers
103 views

How can I find out objectType of Account

I have the following code : Schema.SObjectType objectType = sObjects.get(0).getSObjectType(); I'm trying to write an IF statement to check if the result of objectType is specific object such as ...
4
votes
0answers
64 views

Get Plural Label in specific language

So I can do something like Id myId = '999999999999999'; String objectPluralLabel = myId.getSobjectType().getDescribe().getLabelPlural(); This returns the plural label of the object in the current ...
3
votes
1answer
141 views

How to check if an object has recordtypes specified or not?

I want to find a way how can I check if a type of object, has any record types specified or not. I tried, with the describe methods, by acquiring a List, according to the SObjectType, but this ...
3
votes
1answer
107 views

Get namespace prefix for a field

In a question I asked last week about getting namespaces, the best solution was to get information about the class (or any class) in the namespaced package. But this seems vulnerable if there are ...
4
votes
3answers
248 views

Apex Describe Field pulling unavailable field for SOQL

My describe call is pulling some of these fields (accountname,islocked,middlenamelocal,personkeyid,mayedit) on Contact object. There are few more.And my Dynamic SOQL is complaining that those ...
1
vote
0answers
20 views

Tracking changes to object structures through SOAP API

I am looking to check whether the object that I queried has changed during the previous access. For example, if a new field was added to the Account field, I would like to alert the user that a new ...
2
votes
1answer
35 views

What are ListViewChartInstances?

In v33.0, I see a new object, called ListViewChartInstance when describing all objects through SOAP API. However, in the Salesforce Spring '15 Release notes there's not a single word on them. Does ...
2
votes
1answer
52 views

Describe call returns fields that error in SOQL

The describe call is returning a bunch of fields on Account such as BillingLatitude, BillingLongitude, PhotoUrl, etc that result in the following error when included in SOQL queries: No such ...
1
vote
0answers
39 views

getDescribe() of an External Object throws NPE

I have a external object called "TD_Account__x" whose label is "TD Account". I am trying to do a describe call on "TD_Account__x" and it throws me NPE. Execute anonymous code - System.debug('@@ ...
8
votes
1answer
158 views

Name field of Group sObject is Not Nillable but returns null

I request the metadata for the sObject Group via: GET /services/data/v32.0/sobjects/Group/describe/ HTTP/1.1 In the resulting JSON i see the following metadata at the fields property: { ... ...
1
vote
1answer
75 views

Why Label of a field fetched via code gives a different value than what is displayed on Page Layouts?

I have tried fetching field Labels dynamically in my Visualforce page and apex class through Field Describe, but its been really annoying for me to fix this situation where field Labels are ...
6
votes
1answer
160 views

Standard field accessiblity inconsistent : feature or simply strange?

UPDATE: Thanks to @ca_peterson I could clarify the issue below and it all drills down to FLS. But even having identified FLS as the reason, the behavior is still odd and I have addressed it in this ...
8
votes
1answer
760 views

How to list down all Standard/Custom Objects and ignore System(Internal) Objects

There's always a requirement to pull ALL standard and custom objects using describe call ignoring all system/internal objects. Is there a way for same? One of option is to reference ProcessInstance ...
5
votes
2answers
253 views

What does object.isQueryable() actually mean?

What does is actually mean when a user can 'query' an Object? In other words: what rights does a user have when the Object.isQueryable() returns True? Pages like this only say that isQueryable ...
0
votes
1answer
184 views

How to minimize the view state of the custom visual force page.

How to minimize the view state of the custom visual force page. I have a custom VF page where I have a map that contains the list of sObject names. I need to make it available on the VF page to access ...
2
votes
1answer
32 views

getting layout of user using API

I am using this link to get the layout. I am using a REST client, Here is my request https://ap1.salesforce.com/services/data/v28.0/sobjects/Global/describe/layouts/ Authorization: Bearer ...
1
vote
3answers
5k views

Method does not exist or incorrect signature: [String].getDescribe()

I've checked the other answers and googled alot, cant seem to find the answer to why this doesnt work: public List<SelectOption> AccountIndustryOptions = new List<SelectOption>(); public ...
1
vote
0answers
36 views

Strange Field Describe Issue. Not showing existing fields. May be bug?

We have created an object last two months ago which contains 6 fields and they all are visible by describe call. Now we moved that object to another org with all dependencies etc. But there in ...
4
votes
1answer
309 views

$ObjectType and picklistValues attribute

I've tried to use {!$ObjectType.Case.fields.Status.picklistValues} but it doesn't work Error: Unsupported type common.api.soap.wsdl.PicklistEntry encountered. Based on the documentation I see ...
2
votes
1answer
316 views

Fields based on record type on visualforce page

Suppose I have two record types on a standard object, suppose Opportunity, and out of 100 fields in object, lets say for each record type 50-50 fields are made available to user to enter data on the ...
3
votes
2answers
2k views

How to perform a field describe dynamically using the API name of an sObject?

I am trying to get describe information about an sObject similar to this: public Map<String, Schema.SObjectField> fieldMap{get;set;} fieldMap=Schema.sObjectType.Lead.fields.getMap(); ...
0
votes
1answer
737 views

Calling .getDescribe() on result of SOQL query

If I have an SOQL query as follows, which returns only 1 field. String this_soql = 'SELECT SUM(My_Field__c) myField FROM My_Object__c WHERE Id=: the_Id GROUP BY Id'; SObject r = ...
6
votes
1answer
303 views

How to guard a FeedItem insert when code is executing in a Force.com Site?

I have some code that is used both through a normally licensed user and through a "Site Guest User" for a public Force.com Site. I am aware that for the latter type of User Chatter capabilities are ...
2
votes
0answers
120 views

Managed Package Upgrade fails due to sObject Describe failure

After adding some features to our managed package, our attempts to upgrade the package in a production org is failing with a generic error: Your requested install failed. Please try this again. ...
3
votes
1answer
623 views

Dynamic field retrieval from sobject in vf page

Map<String, Schema.SObjectField> M = Schema.SObjectType.Account.fields.getMap(); from this we can retrieve all the fields but of account object but i want retrieve all the fields of any ...
3
votes
2answers
357 views

Describe limits for objects with a lot of picklists from remoteTK

we are using remoteTK on a salesforce project and its working great except for one very specific issue. We are hitting governor limits with describes for one of the objects. IT has 150 picklists ...
3
votes
1answer
1k views

Compound Address fields and DescribeFieldResult

I have generic code in my org that retrieves all fields that are accessible by user public static String returnAllFields(String objectName){ String fieldsCSV = ''; for(Schema.SObjectField ...
16
votes
3answers
3k views

Is there anyway to get the name/label of a field without doing a field describe?

I want to get the name and label of all the fields for multiple sobjects in one transaction and that will easily hit the governor limits. Is there anyway I can get the label/name without using a ...
1
vote
0answers
182 views

Why would describe layouts endpoint return ENTITY_IS_DELETED error

I am working on a project that uses OAuth against SF via REST on behalf of users from a variety of organizations. For one of our users, I am able to call SObject describe on their Account object and ...