What is Database.setSavepoint in Salesforce?
Database.setSavepoint() in Salesforce apex can be used to rollback the transaction to a point. It helps in partial rollback on the transactions. Database.setSavepoint() is used to define a point at ....
Database.setSavepoint() in Salesforce apex can be used to rollback the transaction to a point. It helps in partial rollback on the transactions. Database.setSavepoint() is used to define a point at ....
Apex Class: global class approvalRecall { webservice static void recallApproval(Id recId) { List<ProcessInstanceWorkitem> piwi = [SELECT Id, ProcessInstanceId, ProcessInstance.TargetObjectId FROM ProcessInstanceWorkitem WHERE ProcessInstance.TargetObjectId =: recId]; Approval.ProcessWorkitemRequest req ....
For MM/DD/YYYY format: <apex:outputText value="{0,date,MM/dd/yyyy}" > <apex:param value="{!dateField}"/> </apex:outputText> Sample Code: Visualforce page: <apex:page controller="Sample" > <apex:form > <apex:outputText value="{0,date,dd'/'MM'/'yyyy}" > <apex:param value="{!temp}"/> </apex:outputText> </apex:form> </apex:page> Apex Controller: public with ....
Sample code: Visualforce page: <apex:page sidebar="false" controller="Sample"> <apex:form > <apex:pageblock id="account" title="Account Details(Standard Object)" > <apex:pageblockTable value="{!acc}" var="a"> <apex:column value="{!a.Name}"/> <apex:column value="{!a.AccountNumber}"/> </apex:pageblockTable> <apex:pageblockButtons > <apex:commandButton value="Fetch Account" action="{!fetchAccount}" reRender="account"/> ....
With sharing and without sharing in Apex Class determines whether the class should enforce all the Organization sharing settings. Scenario 1: Visualforce Page: <apex:page controller="Sample"> The count is ....
Exception: Callout not allowed from this future method. Resolution: Please enable callout by annotating the future method with callout=true. Example: @future(callout=true) Sample Code: @future(callout=true) public static void post(String u, String ....
Sample Code: Visualforce page: <apex:page controller="Sample" > <apex:form > <apex:pageBlock id="details"> <apex:pageblockTable value="{!memb}" var="m"> <apex:column value="{!m.Name}"/> <apex:column value="{!m.Age__c}"/> </apex:pageblockTable> <apex:pageblockButtons > <apex:commandButton value="<<" rerender="details" action="{!beginning}" disabled="{!prev}"/> <apex:commandButton value="<" rerender="details" action="{!previous}" ....
Sample code: Visualforce page: <apex:page controller="Sample"> <apex:form > <apex:pageBlock > <apex:pageBlockSection > <apex:pageBlockSectionItem > <apex:outputLabel value="Value 1"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:inputText value="{!val1}"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Value 2"/> </apex:pageBlockSectionItem> ....
You can use Apex to receive and process email and attachments. The email is received by the Apex email service and processed by Apex classes that utilize the InboundEmail object. ....
With Sharing - Enforce the sharing rules that apply to current user. Without Sharing - Doesn't enforce the sharing rules. If a class is not declared as either with or ....