Like operator in SOQL query in JAVA and C#
Example: String sql = 'SELECT Name,Id FROM Account WHERE Name Like '%' + acctName + '%''; Here 'acctName' is a variable.
Example: String sql = 'SELECT Name,Id FROM Account WHERE Name Like '%' + acctName + '%''; Here 'acctName' is a variable.
Apex: <apex:commandButton value="Find" action="{!find}" reRender="SearchList" status="SearchStatus"/> <apex:actionstatus id="SearchStatus"> <apex:facet name="start"> <c:enhancedactionstatus BackColor="#efefef" borderColor="#336699" borderSize="3" height="50px" width="120px" Message="Loading..." messageStyle="color:darkred; font-size:11pt;font-weight: bold;"/> </apex:facet> </apex:actionstatus> Component: <apex:component ....
Sample Code: Visualforce Page: <apex:page controller="SampleVisualforcePageController" id="pg"> <apex:form id="frm"> <apex:messages/> <apex:pageblock id="AccountsList" title="Accounts List" > <apex:pageBlocktable value="{!listAccounts}" var="acc" > <apex:column title="Select" > <apex:inputCheckbox value="{!acc.selectedBool}"> </apex:inputCheckbox> </apex:column> <apex:column value="{!acc.objAccount.Name}"/> </apex:pageBlocktable> <apex:pageblockButtons ....
Sample code for use of try and catch: try { temp = Apexpages.currentPage().getParameters().get('memNam'); } catch(Exception e) { temp = e.getMessage(); }
The <center> tag in HTML is used to align the <apex:pageblock> center: Sample Code: <center> <apex:pageBlock > <b>Category: </b> <select id ="ctgry" onchange = "memb()"> <option>Please Select</option> ....
To create listbox, just use HTML coding <select id = "myId"> <option value = "ap">Apple</option> <option value = "oran">Orange</option> <option value = "pine">Pineapple</option> </select> To get the ....
Visualforce: <apex:page controller="myController" tabStyle="Account"> <apex:sectionHeader title="New Account Edit Page" /> <apex:form> <apex:pageBlock title="Create a New Account"> <apex:pageBlockButtons location="bottom"> <apex:commandButton ....
PageReference can be used to navigate from the current page to a different page using Salesforce Apex. The below code is used to open new page 'AddAllBlog' from current page. ....
The following code explains how to get values from <apex:inputfield> in controller extension using apex Visualforce: <apex:pageblock title="Blog" mode="edit" > <apex:pageBlockButtons > <apex:commandButton action="{!nxt}" value="Next"/> </apex:pageBlockButtons> ....
apex:inputField can be used to display a Field from an object in a Visualforce page. Sample Code: <apex:page standardController="Account"> <apex:form> <apex:pageBlock> <apex:pageBlockSection> <apex:inputField value="{!Account.Name}"/> <apex:inputField value="{!Account.Industry}"/> <apex:inputField value="{!Account.Description}"/> </apex:pageBlockSection> </apex:pageBlock> ....