Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [describes]

The tag has no usage guidance.

0
votes
1answer
28 views

INVALID_CROSS_REFERENCE_KEY or sObject type 'Lead' is not supported when calling describeSoqlListViews over SOAP

This is a bit of an unusual one. I'v generated Apex classes using WSDL2Apex in Salesforce itself, using Salesforce's Tooling API WSDL file (had to modify it a bit - there's no ANY type in SF). Then I ...
0
votes
0answers
165 views

How to Comparable interface sort a List<String> of Schema.DescribeFieldResult.getName() entries by many DescribeFieldResult properties?

I use str to dynamically generate input fields on a visualforce page. Unlike standard page layouts that come with a drag and drop layout editor, my page's positioning of input fields depends on the ...
3
votes
1answer
950 views

Dynamically retrieving page layout fields

Is it possible to dynamically retrieve the fields on a certain layout? Possibly through something like DescribeLayout()? I'm having trouble finding examples on how to build a lightning component with ...
1
vote
1answer
76 views

Impact of permissions on dynamic apex?

I'm looking for some clarification on the behavior of dynamic apex. I am seeing some inconsistent behavior around schema global describe and sobject describe field maps. In the below example ...
0
votes
2answers
290 views

How do I find the field type of parent/grandparent fields etc?

I have in my SQL relationship fields. The have written this query under a custom object. ex: SELECT name,Contact__r.Account.CreatedBy.Name FROM Four_Level_Check__c LIMIT 5 My need is to find the ...
9
votes
1answer
292 views

What is the difference between creatable vs. updatable on Schema.DescribeFieldResult

When writing CRUD and FLS checks in apex I have noticed that I can check for the following: Schema.DescribeFieldResult fieldDescribe = field.getDescribe(); fieldDescribe.accessible; fieldDescribe....
1
vote
1answer
1k views

Get Attributes from an Apex Object Dynamically

Is it possible to get the name of the attributes of an apex class? I have a class below, is it possible to get the name of its fields at runtime? public class MyObjectApex { public String name {...
1
vote
0answers
27 views

Why are labels for Mobile and Phone not the same in the API?

I asked this question on the Salesforce community but its probably not as active as here so wondering if anyone can shed any information on this; When getting the labels for the Phone and MobilePhone ...
0
votes
2answers
142 views

DescribeSObject for Wrapper class

Is it possible to describe an Inner classes object such as public class DataTableWrapper { public DataTableWrapper() { objectRecordData = new List<ObjectRecordData>(); } ...
8
votes
2answers
3k views

Get SObjectType from 'ObjectName' without using getGlobalDescribe()?

I'm working on rewriting a utility method that gives record type ids without using SOQL queries. I found two ways to do this: Schema.getGlobalDescribe().get(objName).getDescribe()....
1
vote
1answer
46 views

Output object description in Visualforce?

Is there a way to query the description of a custom settings objects so I can use it in my visualforce page. Like OppCountryRegionMapping__c.Description?
5
votes
1answer
958 views

How can I get the API Name of a related EntityDefinition?

I'm trying to use Custom Metadata Types to specify some relationships between objects. So I started out by creating my Custom Metadata Type and adding a Metadata Relationship to an Entity Definition. ...
1
vote
1answer
1k views

is it possible only get writable fields from schema.sobjectfield

I have this code: Map<String, Schema.SObjectField> fields = Schema.getGlobalDescribe().get(Account).getDescribe().fields.getMap(); It gets all the fields of account but I need only ...
6
votes
1answer
78 views

Does SObjectType Access Guarantee Id Access?

I am writing a fluent query builder which I hope will pass security review, and I still have a few nagging questions. I will refrain from asking more than one question per question, so right now, what ...
0
votes
2answers
358 views

how to check FLS of sObject dynamically

if(Schema.Accountr__c.getSObjectType().getDescribe().isAccessible()) In the Above line, I am checking whether that Accountr__c object data is accessible or not. My query is, can I check the FLS of ...
6
votes
1answer
71 views

FieldPermissions.Field contains strings longer than described maximum

I'm investigating an issue where values of one of the columns on the "FieldPermissions" object get truncated when we sync them to a DB. The column in question is called "Field", and it contains the ...
2
votes
2answers
2k views

sObjectField Class Methods getLabel()

The SObjectField class has a getDescribe() method. Does anyone know of a creative way to get the field label for use in Apex? There does not seem to be a getLabel() method per the official ...
12
votes
1answer
798 views

Performance Impact of DescribeSObjects vs. Individual Describe Calls?

I've been wondering this for a while, so it's time to put this question out there. How does Schema.describeSObjects perform when compared to individual calls to SObjectType.getDescribe? For example, ...
1
vote
1answer
125 views

Salesforce Metadata API - Easy Way To Get Entity Relationships / Joins?

Is anyone aware of something free, that already exists, that can comb output from the Metadata API and output useful information about joins between tables? I just wrote my colleagues the following e-...
2
votes
1answer
232 views

Check if a object is undeleteable

I want to check to see if a standard object is undeletable or not. I know there is a property that says isUndeleteable. I can pull out the results with this code but I can't seem to figure out how ...
11
votes
1answer
5k views

Account.sObjectType.getDescribe() vs Schema.sObjectType.Account

What is the difference in below two lines of code for getting the Schema.DescribeSObjectResult? // Get the sObject describe result for the Account object Schema.DescribeSObjectResult dsr = Account....
3
votes
1answer
12k views

Get Label For SObject API Name

I have an exhaustive list of custom objects whose API Names and labels does not match. I end up opening each object in order to determine if the label has matching API Name.I want to see the API Name ...
1
vote
1answer
2k views

Constructor not defined: [System.SelectOption].<Constructor>(String)

I am trying to save below class but getting the error at line: options.add(new SelectOption(String.valueOf(fieldSetMemberObj.getFieldPath())), String.valueOf(fieldSetMemberObj.getLabel())); I tried ...
4
votes
2answers
3k views

What governor limits impact Apex Describe methods?

Are there any governor limits, or considerations that I should be aware of when using Apex Describe methods? So for example, the author of this blog post uses the structure below to get the record ...