Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [describesobject]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

List of fields and whether or not they are Encrypted And tracked in Field history

I have been wracking my brain trying to figure out a way to get a list of fields and include whether they are encrypted, and whether they are marked for field history tracking. I seem to be able to ...
1
vote
2answers
35 views

Is there a way to check if an object is the actual object visible in the objects tab in an org?

We have need to run through every object in an org to determine which ones have certain fields our app needs. We ONLY care about the actual objects (case, campaign, contract, custom objects, etc...). ...
0
votes
1answer
52 views

Most efficient way to get all child records for a specific record

I have an account record that I want to get every single possible child record - ideally as a list of IDs. Currently I am doing the following: for(Opportunity opp : [SELECT ID From Opportunity ...
3
votes
1answer
40 views

Is Contact othergeocodeaccuracy a legitimate field?

Many of our Continuous Integration builds just failed with hundreds of this error: System.QueryException: No such column 'othergeocodeaccuracy' on entity 'Contact'. Our code does describe calls ...
5
votes
1answer
100 views

Any way to get Child Relationships without being bound by user permissions?

Question User object-level permissions limit the results of DescribeSObjectResult.getChildRelationships(). Are there any workarounds? I have submitted an Idea about this (https://success.salesforce....
0
votes
2answers
23 views

Prevent other fields which is part of managed package

Retrieve all fields for particular sObject it is working fine but then i insall app which is part of manage package also retrieving fields of manage package. how to prevent to retrieve. objects/...
1
vote
1answer
81 views

How to access Owner field using getDescribe().fields.getMap()

I have a below code to access owner field from sObject. Map <String, Schema.SObjectType > sObjects = Schema.getGlobalDescribe(); Schema.SObjectType targetType = sObjects.get('...
0
votes
0answers
57 views

Objects not in getGlobalDescribe() (Scorecard, ScorecardMetric, ScorecardAssociation)

i am confused why the objects Scorecard, ScorecardMetric, ScorecardAssociation arn't listed in the getGlobalDescribe() Map. Documentation (https://developer.salesforce.com/docs/atlas.en-us.apexcode....
1
vote
1answer
242 views

Determine if User is System Administrator without a query

has anyone found a way to check if the current user is a sysadmin without consuming a query? Seems like something that should be easily determined using Describe but haven't seen a solution to this. ...
8
votes
2answers
153 views

Apex method to find out if SObject is a setup object

Regular SObjects and Setup Objects can't be mixed in DML otherwise you'll experience a Mixed Dml Exception. How can Apex code find out if a given SObjectType is such a setup object? System.assert(...
10
votes
1answer
170 views

Drawbacks of using SObjectField.toString() over SObjectField.getDescribe().getName()

I often do '' + field where field is an SObjectField to get the field's API name. I like that much more than the clunky verbose field.getDescribe().getName(). So is there a reason I should not do it ...
1
vote
2answers
113 views

Is there a way to determine if an object supports list view?

Is there a way to determine if an object supports list view? I've developed a VF page which shows a list of Objects and based on Object selection it shows list views of that selected object. For some ...
0
votes
2answers
35 views

Type safe access to SObject ChildRelationships describe

To access an SObjectField you can use Account.Field_Name__c. This has the advantage of being checked at compile time. Is there an equivalent syntax for ChildRelationship? Account.Contacts does not ...
1
vote
1answer
95 views

sobjects describe label displaying a different label

I'm using the toolkit for .net and am making a soobjects/{type}/describe request to get the fields for a given entity. See code for "DescribeAsync" in https://github.com/developerforce/Force.com-...
0
votes
1answer
259 views

Using Describe to return single field result

I wrote a generic method that takes an object, field and value as string parameters and returns the picklist label. I was wondering if there is a more efficient way to write the method instead of ...
5
votes
1answer
81 views

Impact of Shield Platform Encryption on describe calls?

Some old code was obtaining information about record types by querying the RecordType object. But now that the RecordTypeInfo describe API includes the record type developer name, we have changed the ...
0
votes
1answer
28 views

How to get Two articles in One list using salesforce query

Hi every one I have a two articles: Offer__kav and Offer_order__kav. How to Query This Two Objects Related All Fields. For Ex: I tried : List<List<SObject>> search_results = [FIND 'SFDC'...
0
votes
1answer
110 views

How to get related objects and fields of a parent object dynamically?

Can any one suggest me how I can get related objects and their fields of a parent object.Here is the code I have tried so far: public void discoverRelatedAccessibleFields(sObject newObj) { ...
2
votes
2answers
410 views

Partner API describeSObject on Contact fails with “Instance validation error: 'urn:address' is not a valid value for soapType.”

We're trying to pull down picklist values from the Contact object to show on an ASP.Net page using the Partner API. However, we receive the following error when the describeSObject call is made. "...
0
votes
0answers
209 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 ...
0
votes
2answers
539 views

getSObject - Dynamically Referencing Object Fields from Map

I have a Map of IDs of a custom object (scopeAccountMap). I am iterating through each object in scopeAccountMap and I am creating a map of the fields for each of these objects. I am receiving the ...
3
votes
1answer
1k 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 ...
2
votes
1answer
55 views

Get All User References fields

I want to get dynamically all field for object (assume for Account) which are User reference . Using the describe method I can check that the field is Reference type but not clear how/if can I check ...
2
votes
2answers
127 views

Check from Apex if object supports custom fields

In Salesforce there are some specific objects like Attachment, RecordType etc. which are 'closed', i.e. we cannot create custom fields on them, in opposite to 'open' objects, e.g. Account, Contact etc....
1
vote
1answer
84 views

describeSObject for Individual object

Is it possible to call the describeSObject method for the Individual object?I am using the Partner-Connection-API com.sforce.soap.partner.DescribeSObjectResult describeSObject(java.lang.String ...
0
votes
2answers
642 views

Dynamic SObject API Name from Object Label

Is there a way to fetch the Object API Name using the Dynamic Object label and Schema. The other way around i have done. But i need this way to get SF API Names to be sent through Rest. I tried for ...
4
votes
1answer
2k views

How to present state and country picklists with dependency logic in a Lightning Component?

It's not too hard to present the Contact/Account state and country picklists themselves, but the dependency filtering where when you select "United States" as the country only the 50 or so relevant ...
5
votes
1answer
109 views

Get list of “first-class” Salesforce objects

I'm working on a managed package that will allow users to select an object in their org and create a mapping with an external service. I noticed that Schema.getGlobalDescribe() returns a plethora of ...
2
votes
3answers
746 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. ...
2
votes
2answers
1k views

'System.LimitException: Maximum stack depth reached: 1001' Error message

What is the meaning of the error message: System.LimitException: Maximum stack depth reached: 1001 I am trying below code, and on previewing the page from 'Developer Console', this error appears. ...
0
votes
1answer
356 views

Picklist values per record type using REST?

When you have a picklist and you can set different values per record type, how do you gain information on what field is available for each record type? Looking at what the REST api returns, this ...
1
vote
0answers
28 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
1answer
107 views

Metadata for matching filter for sObject

I'm trying to find the metadata for the matching filter for any sObject in my case its 'Opportunity' is that possible to find out the what the filter matching creatria is? using REST API I have ...
0
votes
2answers
468 views

How can I get select options from multiple objects in lightning component

Im trying to get multiple picklist from multiple objects in my component, I see some ideas of using the describe method but then I must specify the exact field names and object to pull. I have about ...
4
votes
2answers
5k views

converting string to Schema.SObjectField

I have created an API But struggling in converting String to Schema.SObjectField as If there is any possible way to cast string into Schema.SObjectField field type for example Account.example__c to ...
6
votes
1answer
130 views

REST API returns different results based on the base URL

Problem: Hitting the REST API from JS (inside a VF page) seems to be returning and old (or cached) version of the page layout. Examples: https://eu6.force.com/services/data/v40.0/sobjects/Contact/...
0
votes
2answers
422 views

Need to filter only lookup/master-detail kind of fields from the entire fields on an object

I am querying all the fields on the Lead object and displaying them as a picklist on a visualforce page. I do not want the Lookup/Master-detail relationship fields to be displayed, though. For ...
0
votes
2answers
184 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>(); } ...
0
votes
1answer
57 views

Need to display field labels in an alphabetical order

I am displaying all the fields of an object in a picklist. I am fetching the same using the Schema.SObject class. But, I want to display the labels in the picklist in an alphabetical order. Is there ...
0
votes
1answer
449 views

If-Modified-Since header not working

I am trying to use the If-Modified-Since header with SObject Describe https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/describe_global_with_ifmodified_header.htm I want to ...
1
vote
1answer
476 views

Dynamic field set with mass update

We have a VF page that allows users to mass update cases based on whatever fields are on the page. The page displays a temp case whose values are then applied to the list of selected cases. We ...
4
votes
1answer
305 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
1answer
360 views

Contact Fields not visible on Person Account

According to this document when Person Accounts is enabled for the Salesforce Org, there should be new fields added to the Account object (PersonMailingCountry, PersonMailingCity, etc.). However, when ...
0
votes
0answers
340 views

Get SObjectField with same API Name dynamically across SObjects

I have a unique situation. I have several different SObjects that are using the same field API names and I'm trying to get them dynamically by passing the SObjectType. For instance. This is for a ...
0
votes
1answer
1k views

Object and Field Describe in Lightning Component

Is it possible to get sObjectDescribe in Lightning Components? In my case I need to have all possible values of picklist-field, but filter out the list of options conditionally.
2
votes
1answer
753 views

How to use GetSObject to retrieve related data in a null safe manner?

I have a lookup relationship. If I just do the following query it works fine: Sobject c = [select field__r.fieldchild__c from custom_obj where Id = :someId]; system.debug('c:' + c); However with ...
0
votes
2answers
145 views

How to put in VF page a link to the full list of related records of a parent?

I've seen that when a related list in a record's detail page surpasses 5 (or something) records, there is a link in the bottom that navigates to the full list of related records and nothing else. In ...
6
votes
0answers
78 views

Is there is any way to get standard field api name from standard report types reports in apex?

I want to get the api name of the standard field being used in Reports of Standard report types. I used describe methods to get the columns used in a report. I analysed some of standard reports ...
2
votes
1answer
67 views

Describe method in different API versions

I wrote few days ago regarding strange behavior of describe method on quote that return unexpected fields. Now finally I was able to reproduce the issue in "clean" environment. Meaning, I wrote the ...
0
votes
0answers
106 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 ...