How to find insert or update using Apex in Salesforce?
Sample Code: Visualforce Page: <apex:page standardController="Account" extensions="Sample"> <apex:form > <apex:pageMessage rendered="{!NOT(updateBool)}" severity="info">Insert</apex:pageMessage> <apex:pageMessage rendered="{!updateBool}" severity="info">Update</apex:pageMessage> </apex:form> </apex:page> Apex Class: public class Sample { public ....