Skip to main content

Posts

Showing posts from September, 2014

How to get help text in apex class ??

We generally use help text while creating custom field in salesforce . Sometimes we need it in apex controller while development. This post is regarding to get help text of particular field and display in vf page.  Here is some code snippet to get help text in apex class. Schema.DescribeFieldResult dfr = Schema.sObjectType.Account.fields.TestField__c; String helptext = dfr.getSObjectField().getDescribe().getInlineHelpText(); In the visualforce page we can display help text. {!$ObjectType.Account.fields.TestField__c.inlineHelpText}

How to check list size in Visualforce page

Hi All, It seems to very simple by name but not as much simple as you are thinking now.As we all know list itself has a method so called size() to check its size,however we can write list.size() in controller, which will return no. of elements present in the list otherwise return 0 if no elements present .But we can not write list.size method in visual-force page,then how will we check ???? For that I have done a workaround, one visual-force page is there having one field Account Type. When Account Type will be selected with some value ,then list of Accounts records will be displayed whose Account Type is matched with the selected value otherwise a message saying No Accounts Present in this Type. Here is page:- <apex:page controller="passingParamActionFuncController">     <apex:form >         <apex:pageBlock title="Account Information" id="pb">             <apex:pageBlockSection >   ...