You need to sign in to do that
Don't have an account?
conpas
How to retrieve custom fields from custom object?
This is my question. I try to retrieve a custom field from a custom object, but I cant.
My controller code:
public class viewcase {
String Name = ApexPages.currentPage().getParameters().get('Name');
public List<prueba__c> getData() {
return Database.query('select Name, Language__c, Theme__c, FTP__c from prueba__c limit 10');
}
}
Mi page:
<apex:page showHeader="false" controller="viewcase" cache="false"> <apex:stylesheet value="{!URLFOR($Resource.SiteSamples, 'estilos.css')}" /> <apex:image id="johnryanheaderimage" value="http://www.conpas.net/jr/php5MJFUrAM.jpg" style="padding:15px;"/> <center> <a href="newcase">New case</a> | <a href="mycases">My cases</a> | <a href="myopenedcases">My opened cases</a> </center> <apex:pageBlock title="My cases" mode="edit"> <apex:dataList value="{!Data}" var="d" id="theList"> <apex:outputText value="-{!d.ID}"/> <apex:outputText value="-{!d.FTP__c}"/> <apex:outputText value="-{!d.Name}"/> </apex:dataList> </apex:pageBlock> </apex:page>
I see empty the custom fields, why? I try to activate all security doors, but maybe this no is the way.
Thanks.
Do you see any rows in the output, or is the datalist just empty?
THanks for the reply.
I see only the standard fields, the custom fields is just empty.
I am having the same issue when I try to display any custom fields in the account object. Any standard fields, such as, Name, fax, phone, ect. display just fine but hte custom fields are just empty or blank.