September 2013

Salesforce

How to store value checked by checkbox ( on the VF page ) in the database with controller?

Sample Code: Visualforce page: <apex:page controller="Sample"> <apex:form >     <apex:pageblock >         <apex:pageBlockSection >             <apex:panelGrid columns="2">                 Name :                 <apex:inputText value="{!Nam}"/>                 Skilled :                 <apex:inputCheckbox value="{!Skilled}"/>             ....

Salesforce

How to give SOQL limit size dynamically for retrieving records using Apex in Salesforce?

Sample Code: Visualforce page: <apex:page controller="Sample"> <apex:form >     <apex:pageblock >         <apex:pageBlockTable value="{!MemList}" var="M">             <apex:column value="{!M.Name}"/>         </apex:pageBlockTable>     </apex:pageblock> </apex:form> </apex:page> Apex Controller: public class Sample {   ....