function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
John SaundersJohn Saunders 

describeSObject Inaccuracies

I found that the ownerId field of the Group object as returned by describeSObject is said to be type reference, and the referenceTo value is just User. Yet I also find the ID of an Organization in that column.

Similarly, the UserId of QueueMember is said to refer to User, but I see it containing something with a "00G" prefix.

Can someone help me understand this?

John Saunders

 

benjasikbenjasik
Both are bugs with our describe. I will log as such for our next release.

Note that QueueMember is really the same as GroupMember, and GroupMember has the foreign key defined as User or Group
John SaundersJohn Saunders

Thanks for the information. I'll treat these as special cases. Do you happen to know of any other special cases? I'd like to be able to depend on describeSObject being accurate.

Also, a suggestion on QueueMember and GroupMember being the same. Please don't do that! At least, please don't do that without reflecting it in the metadata. Perhaps you should add an aliases column to DescribeSObjectResult? It could be a string array, and would assist in maintaining my sanity.

Are there any other aliased objects?

Thanks,

John Saunders

benjasikbenjasik
Sorry, what I meant is that GroupMember is a superset of QueueMember. If you look, they have the same IDs and the same fields. Queue and QueueMember will eventually be deprecated, but no timeline yet. I would suggest using Group and GroupMember. A queue is a Group of type Case or Lead.

No other aliased objects, and I know of no other special cases. If you find anything else, please post them.

Thanks for letting us know about this one!
John SaundersJohn Saunders

Ok, here's another. The "Status" field of the "Approval" object has a "Length" of 1!

You might want to check to see if you have any other picklists with a Length of 1.

John Saunders