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
rsoesemannrsoesemann 

Not possible to get dynamic field describe information from a visualforce page?

I am working on a visualforce component that displays fields of arbitrary sobject.

Now I need a way to get some field describe information for a given sobject name and field name.

As I cannot pass Describe objects to the page I would have to create my own schema class to pass this Not nice!

 

The I read one could use the $ObjectType global variable in pages and that this works with dynamic binding. But it seems only to work with fields not objects...

 

WORKS:                         {!$ObjectType.Account.Fields[fieldName].Label

 

DOES NOT WORK:        {!$ObjectType[objectName}.Fields[fieldName].Label

 

Why and in case this does not work what else should I do to get those information without an extra custom class?

 

Thanks in advance

 

Robert

aballardaballard

I assume you meant {!$ObjectType[objectName].Fields[fieldName].Label}  not what you have in your post.  

 

I think there are currently some bugs related to this; it should be working in the next (Spring 12) release. 

rsoesemannrsoesemann

Oh yes you are right, I had a typo. But anyway I does not work. where can I find infos on those bugs and is there a workaround until the realease of Spring 12?

 

Robert

salesforce@reserveadvisors.comsalesforce@reserveadvisors.com

Any news with this? I was trying to do something similar. I posted about it here: http://forums.sforce.com/t5/Java-Development/Javascript-GETRECORDIDS-on-Contract-to-Return-Account-Ids/td-p/439347

tggagnetggagne

I'd ove to be able to get the field's id so I could dynamically code the urls in the question...

 

 

http://boards.developerforce.com/t5/General-Development/Overiding-a-standard-button-using-visualforce-with-a-simple/td-p/178280