You need to sign in to do that
Don't have an account?
U
Get Fields APIs on Page Layout
Hi experts,
I would like to get all fields API names on specific page layout and use the fields in SOQL. Then I want to display the query results on Visualforce page.
I asked Salesforce Support for help but they cannot answer this question so I searched on Discussion Forums and found some articles about DescribeLayoutResult.
https://developer.salesforce.com/forums/?id=906F0000000AG13IAG
I read links for references but I'm just confused and not sure what to do.
Does anyone provide me simple but complete code to display field details on Visualforce page so that I can amend it for my use.
It would be nice if you can use Lead object and Name field.
Thank you in advance.
I would like to get all fields API names on specific page layout and use the fields in SOQL. Then I want to display the query results on Visualforce page.
I asked Salesforce Support for help but they cannot answer this question so I searched on Discussion Forums and found some articles about DescribeLayoutResult.
https://developer.salesforce.com/forums/?id=906F0000000AG13IAG
I read links for references but I'm just confused and not sure what to do.
Does anyone provide me simple but complete code to display field details on Visualforce page so that I can amend it for my use.
It would be nice if you can use Lead object and Name field.
Thank you in advance.
Not sure what you are trying to do, but for now it's probably best for you to get all the fields manually then construct the SOQL.
If you need it to be dynamic, you would need to learn SOAP/web services or get a developer to help you.
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
1) http://amitsalesforce.blogspot.in/2015/11/apex-describe-dynamic-retrieval-of.html
Let us know if this will help you
Thanks
Amit Chaudhary
Thx
As to getGlobalDescribe() method, I have already tried and found out this method does not do what I want.
I'm writing all fields in Apex manually now.
Thanks,
U