apex:actionPoller
A timer that sends an AJAX update request to the server according to a time interval that you specify. The update request can then result in a full or partial ....
A timer that sends an AJAX update request to the server according to a time interval that you specify. The update request can then result in a full or partial ....
Visualforce page: <apex:page controller="testController"> <apex:form id="myform"> <apex:pagemessages /> <apex:pageBlock id="myblock"> Email Address: <apex:inputText value="{!email}" id="email"/><br/><br/> <apex:commandButton value="Click me!" action="{!checkEmail}"/> </apex:pageBlock> </apex:form></apex:page> Apex Code: public class testController{ public String email { ....
To call Apex method from Custom Button, follow the below steps 1. Create a custom button and enter the following code Syntax: {!REQUIRESCRIPT("/soap/ajax/12.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/12.0/apex.js")} sforce.apex.execute("Class_Name","Method_Name",{parameter_Name:"value"}); location.reload(true); Code: {!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")} var ....
Collection size exceeds maximum size of 1000 error in Salesforce means List, Set & Map size exceeded more than 1000 to be shown on the Visualforce page. To avoid this, ....
The below code is used to display Rating picklist of standard object Account. <apex:page standardController="Account"> <apex:form > <apex:pageMessages /> <apex:pageBlock > <apex:pageBlockSection columns="2"> <apex:pageblockSectionItem > <apex:outputLabel value="Rating"/> </apex:pageblockSectionItem> ....
Sample Code: List<String> mail = new List<String>(); String error = ''; Integer i; Integer len; mail.add([email protected]); mail.add([email protected]); mail.add([email protected]); mail.add([email protected]); len = mail.size(); i = 0; for(String temp:mail) { if(i>len-1) ....
Sample Code: Visualforce page: <apex:page controller="sample"><script type="text/javascript"></script> <apex:form > <apex:pageMessages /> <apex:pageBlock > <apex:pageBlockSection columns="2"> <apex:pageblockSectionItem > <apex:outputLabel value="Metro"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem > <apex:inputCheckbox value="{!metro}"> ....
Sample Code: Visualforce Code: <apex:page controller="sample"> <apex:form > <apex:pageMessages/> <apex:pageBlock> <apex:pageBlockSection columns="2"> <apex:pageblockSectionItem> <apex:outputLabel value="Known City"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem> <apex:inputCheckbox value="{!knwCity}"> <apex:actionSupport event="onchange" reRender="a"/> </apex:inputCheckbox> ....
In Salesforce Visualforce Page, we can dynamically make a field read-only using disabled attribute. Sample Code: Visualforce page: <apex:page controller="sample"> <apex:form > <apex:pageBlock> <apex:pageBlockSection columns="2"> <apex:pageblockSectionItem> <apex:outputLabel value="State"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem> ....
Sample Code: Visualforce page: <apex:page controller="sample"> <apex:form > <apex:pageBlock> <apex:pageBlockSection columns="2"> <apex:pageblockSectionItem> <apex:outputLabel value="State"/> </apex:pageblockSectionItem> <apex:pageblockSectionItem> <apex:selectList size="1" value="{!state}"> <apex:selectOptions value="{!states}"/> <apex:actionSupport event="onchange" reRender="a"/> </apex:selectList> ....