Skip to main content

Posts

Showing posts from February, 2017

How to tab Order for the fields in visualforce page?

We can use the attribute  tabOrderHint of visualforce page to control tab order. <apex:inputField   value= "{!Account.AnnualRevenue}"   tabOrderHint= "1" / > <apex:inputField value="{! oppyContact.Contact_Street_Address__c}" tabOrderHint="1"/> <apex:inputField value="{! oppyContact.Contact_Country__c}" tabOrderHint="3"/> <apex:inputField value="{! oppyContact.Contact_State_Province__c}" tabOrderHint="2"/>                      <apex:inputField value="{! oppyContact.Contact_Zip_PostalCode__c}" tabOrderHint="4"/>

How to use Field Set in Page and in Controller

Sometimes we  don't know which fields should be displayed in the page and which field should be added in the query. To solve this issue and make it salable SFDC has given cool features called Field set. This post will share some code snippet about using field set in the page and in controller. In the page <apex:repeat value="{!$ObjectType.Lead.FieldSets.Update_Fields_FieldSET}" var="f">             <apex:inputField value="{!leadTemp [f]}"/><br/>       </apex:repeat> Public Lead leadTemp {get;set;} In the apex class String sQuerry = 'Select id,GEO__c,Is_Locked__c,';        for(Schema.FieldSetMember f : SObjectType.Lead.FieldSets.Update_BDR_Activity_Fields.getFields()) {                 sQuerry = sQuerry+f.getFieldPath()+',';                            }     ...