You need to sign in to do that
Don't have an account?
Satishakumar Awati
Unknown function Check spelling DescribeSobjectResult getName
Hello everyone, I am trying to build a screen which dispays all objects within a salesforce organization.
This is my controller code
Unknown function objResult.getName. Check spelling.
Kindly help me to get away with this error message and I am beginner to salesforce and trying to build my first visualforce page.
This is my controller code
public class MySchemaController { public List<Schema.SObjectType> getSchemaSObjectTypes(){ List<Schema.SObjectType> sobjectTypes = Schema.getGlobalDescribe().values(); return sobjectTypes; } public List<Schema.DescribeSobjectResult> getSchemaSObjectTypeResults(){ List<Schema.DescribeSobjectResult> describeSObjectResults = new List<Schema.DescribeSobjectResult>(); for(Schema.SObjectType objResult : getSchemaSObjectTypes()){ describeSObjectResults.add(getSObjectResult(objResult)); } return describeSObjectResults; } public Schema.DescribeSobjectResult getSObjectResult(Schema.SObjectType obj){ Schema.DescribeSObjectResult objResult = obj.getDescribe(); return objResult; } public String getSobjectResultApiName(Schema.DescribeSobjectResult objResult){ return objResult.getName(); } }And my visualforce page code is
<apex:page showHeader="false" sidebar="false" controller="MySchemaController"> <apex:form> <apex:pageBlock title="Objects"> <apex:pageBlockTable value="{!SchemaSObjectTypeResults}" var="objResult"> <apex:column value="{! objResult.getName()}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>While saving page code I am getting below error message.
Unknown function objResult.getName. Check spelling.
Kindly help me to get away with this error message and I am beginner to salesforce and trying to build my first visualforce page.
apex class :
vf page : output :
Thanks, let us know if it helps you and close your query by choosing best answer if it helps you
http://sfdcmonkey.com
All Answers
apex class :
vf page : output :
Thanks, let us know if it helps you and close your query by choosing best answer if it helps you
http://sfdcmonkey.com