You need to sign in to do that
Don't have an account?
devcg15
How do I access the standard and custom both fields of a standard object with a standard controller?
Hi,
I am working on standard objects in which I want to fetch all fields (standard and custom both) dynamically in a list.
For custom fields can fetch from the dynamic list but doesn't get custom field’s value.
for(SObject feedObject: sobjs){
if(feedObject instanceOf Lead){
Lead_Title = ((Lead)feedObject).Title;
Lead_Company = ((Lead)feedObject).Company;
Lead_TestField= ((Lead)feedObject).TestField__C; // doesn’t get the value of ” TestField “.
}
}
I am working on standard objects in which I want to fetch all fields (standard and custom both) dynamically in a list.
For custom fields can fetch from the dynamic list but doesn't get custom field’s value.
for(SObject feedObject: sobjs){
if(feedObject instanceOf Lead){
Lead_Title = ((Lead)feedObject).Title;
Lead_Company = ((Lead)feedObject).Company;
Lead_TestField= ((Lead)feedObject).TestField__C; // doesn’t get the value of ” TestField “.
}
}
i debug your code my code working wel,l i featch custom filed as well please check your sobjs var list ,that you query TestFiled__c feild from lead
my sample code is here...
debug log -:
thanks
Please mark it as solved if this helps you so that it will make for others as a proper solution ;)