Questions tagged [describefieldresult]

is a class that contains methods for describing sObject fields.

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
269 views

REST API error middlename,suffix,informalname fields do not exist but they appear in describe results

We develop a AppExchange package and are having an issue with middlename,suffix,informalname fields on the Contact object. The issue is these fields are returned through a describe call also filtering ...
7
votes
0answers
103 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
0answers
188 views

DescribeFieldResult.getReferenceTo returns only one type in a specific scenario

I am seeing some strange behavior where DescribeFieldResult.getReferenceTo returns only one type for the Lead.OwnerId field in some cases when invoked in a trigger context. The code below displays ...
2
votes
0answers
57 views

Field History object - value of column “Field” when tracked field is lookup (standard v custom)

I'm trying to selectively delete an SObject's field histories based on the members of an sobject's fieldset (think PII deletion - feature available V42). Example: OOTB Order with field set containing:...
2
votes
1answer
317 views

Programatically how can I link Case Status Values to a Defined Business/Support Process

I am trying to create a custom visualforce page that is aware of the Case Status Values that are related to a specific Case Support Process. I am able to get all Status Picklist Values from a ...
2
votes
1answer
38 views

Do standard lookups always follow: FieldName = RelationshipName + “Id”?

Can we say that all standard lookups/master-details/polymorphic fields follow a consistent naming convention across all standard objects? I'm talking about this pattern: field name = field ...
2
votes
1answer
82 views

Determine if DescribeFieldResult is writeable by anyone not current user

I'm trying to build a list of fields for an object in Apex that are writeable by any user. There are methods isCreateable() and isUpdatable() but those return results based on the current user. Is ...
1
vote
0answers
17 views

No such field ActivityOriginType even though returned through field map

We have an all fields query that gets the field map from an object's describe in Apex. It then loops over the map and assembles a query. In one clients org, the field map is spitting out ...
1
vote
0answers
73 views

Get the active and inactive values from the Picklist

I'm trying to get the active and inactive values, especially the inactive ones, from a picklist to activate them via code. The problem is that I can only get the active values. List<String> ...
1
vote
0answers
184 views

How can the Describe for a Field of getPopulatedFieldsAsMap() be null

I'm doing a CRUD check on Field level, since under some weird circumstances our customers don't have update rights on Record level, but only on fields (it's a guest license). So in addition to the ...
1
vote
1answer
47 views

DescribeSObjectResult not fetching Picklist

Need urgent Help I am executing the following code in execute anonymous. String objtype = 'Lead'; SObject objToBeCreated ; if(objtype == 'User') objToBeCreated = new User(); ...
1
vote
0answers
98 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('@@ ==&...
1
vote
0answers
59 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 ...
1
vote
1answer
458 views

“Field User.LastPasswordChangeDate is inaccessible in this context” when running 'Schema.sObjectField.getDescribe()'

The issue occurs when a bit more restricted profile is being used, so I am still reviewing whether it is actually the cause or if it's something else. n.b. we are working in a namespaced scratch org, ...
0
votes
0answers
273 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
1answer
649 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
395 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
0answers
36 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
121 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: ...