Another Salesforce blog!!!

Salesforce, Apex

IMPORTANT

MULTI SELECT LIST

Visualforce page: <apex:page controller=”MultiselectExampleController”> <apex:form > <apex:pageBlock title=”Contacts”> <c:MultiselectPicklist leftLabel=”Available Contacts” leftOption=”{!allContacts}” rightLabel=”Selected Contacts” rightOption=”{!selectedContacts}” size=”14″ width=”150px”/> <apex:pageBlockButtons > <apex:commandButton value=”Save” action=”{!save}”/> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> <apex:outputText >{!message}</apex:outputText> </apex:page> Controller: public with sharing class MultiselectExampleController { public SelectOption[] selectedContacts { get; set; } public SelectOption[] allContacts { get; set; } public String message { get; set; […]

SEARCH BUTTON WITH PAGINATION

<apex:page controller=”AccountMultipleSearchWithPagenationCLS” action=”{!searchAcc}” > <script type=”text/javascript”> window.onload=function() { // document.getElementById(“{!$Component.thePb.thepbs.accName}”).focus(); } </script> <c:SearchComponent ></c:SearchComponent> </apex:page> <apex:component controller=”AccountMultipleSearchWithPagenationCLS” > <script type=”text/javascript”> window.onload=function() { // document.getElementById(“{!$Component.thePb.thepbs.accName}”).focus(); } </script> <apex:form > <apex:pageBlock id=”thePb” title=”Account Details To Search”> <apex:pageblockSection id=”thepbs”> <!–apex:inputField value=”{!acc.Created_From_Date__c}” /> <apex:inputField value=”{!acc.Created_To_Date__c}”/–> <apex:inputField value=”{!acc.Name}” required=”false” id=”accName”/> <apex:inputfield value=”{!acc.accountNumber}”/> </apex:pageblockSection> <apex:pageblockButtons location=”bottom”> <apex:commandButton value=”Search” action=”{!searchAcc}” /> </apex:pageblockButtons> […]

POST Data to HttpRequest/HttpResponse

Another common use case for HTTP callouts is sending data to a service. For instance, when you buy the latest Justin Bieber album or comment on your favorite “Cat in a Shark Costume Chases a Duck While Riding a Roomba” video, your browser is making a POST request to submit data. Let’s see how we […]

Get Data from HttpRequest/HttpResponse

First Authorize Endpoint Addresses: Authorize Endpoint Addresses We love security at Salesforce! So, any time you make a callout to an external site we want to make sure that it is authorized. We can’t have code calling out willy-nilly to any endpoint without prior approval. Before you start working with callouts, update the list of […]

Next posts