Salesforce Apex Scheduler Limits
Sa1lesforce.com has set some limits on Apex Scheduler. Following are the limits in Apex Scheduler in Salesforce.com. 1. You can only have 100 scheduled Apex jobs at one time(Maximum number ....
Sa1lesforce.com has set some limits on Apex Scheduler. Following are the limits in Apex Scheduler in Salesforce.com. 1. You can only have 100 scheduled Apex jobs at one time(Maximum number ....
Exception: System.ListException: Before Insert or Upsert list must not have two identically equal elements Resolution: This exception occurs when you are trying to insert or upsert a list which is ....
Note: Use apex:outputField to consider using User's locale(currency and date format). Sample Code: Visualforce page: <apex:page controller="Sample"> <apex:outputLabel value="The value is : "/> <apex:outputText value="{0, number, currency}"> <apex:param value="{!inte}"/> </apex:outputText> ....
To open the URL in a new Tab for PageReference, kindly use <apex:commandLink/>. Sample Code: Visualforce page: <apex:page controller="Sample"> <apex:form > <apex:pageblock > <apex:commandlink action="{!openSearch}" target="_blank" style="text-decoration:none;"> ....
Date() can be used to get the date from datetime field. Sample Code: Datetime LastModifiedDateTime = Datetime.now(); System.debug( 'LastModifiedDateTime is ' + LastModifiedDateTime ); Date ModifiedDate = LastModifiedDateTime.Date(); System.debug( 'ModifiedDate is ....
You can use the following trigger to count the number of Contact records associated with an account record. Note: For existing records, do a one time data load with the ....
Sample Code: Event objEvent = new Event(); objEvent.Type = 'Email'; objEvent.Subject = 'Test'; objEvent.Description = 'Testing'; objEvent.StartDateTime = System.now(); objEvent.EndDateTime = System.now().addMinutes( 60 ); objEvent.Location = 'Sample'; insert objEvent; Output:
UserInfo.getTimeZone() can be used to get the current User time zone in an Apex class. Use the following code for your reference. Sample Code: TimeZone tz = UserInfo.getTimeZone(); System.debug( tz ....
Month() method can be used to get current month using apex in Salesforce. Also, format( 'MMMM' ) can be used to return the month in String since the Month() method returns ....
To add users to Public Group using Apex, we have to insert the entries in GroupMember entity. As per the following trigger, when a user record is created, the created ....