Questions tagged [describesobjectresult]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
52 views

Access object fields through String

Is it possible to access all of an objects fields through the schema class using a string? I know we can do this with an id. Schema.DescribeSObjectResult sor = id.getSobjectType().getDescribe(); Is ...
11
votes
2answers
283 views

Access to SObject Schema in Apex is very slow after API v44

We needs to use Schema and DescribeSObjectResult classes to get all SObject in the user's organization. But we noticed performance problem after upgraded to API v44. The following code could reproduce ...
2
votes
3answers
491 views

To find Custom objects inside apex

I want to check whether a given object is standard or custom. At present I have a method which identifies custom objects but that is taking too much CPU time, which leads to salesforce exception. ...
0
votes
1answer
3k views

How can I get the list of all fields(API name,Label,type) of any sObject?

I'm trying to build a Dynamic list(table) of records by selecting the Sobject and its fields.So I need to get all the fields with its API name,label,type.But I can't get the label and type.(Tried ...
4
votes
1answer
296 views

Variable does not exist: fields [= getDescribe().fields]

A couple weeks ago, in the nightly test runs some tests started failing randomly (I guess it is related to the Summer'17 release.) I was not able to reproduce this, in console or Setup test runs they ...
0
votes
0answers
99 views

Salesforce SOAP API getDescribes() strange behavior

I'm running into a very strange issue for a particular SOAP API Call describeSObjects() as oppossed to describesObject() which gives varied result for a particular object. There is an object ...
6
votes
2answers
6k views

How to get object Prefix from string type of object name?

I have following code to return prefix of any object based on API name of object passed as string. : private static String getObjectPrefixID(String objName){ Schema.DescribeSObjectResult r =...