Blogs
-
Approve Records in Bulk Using Apex
The following sample code approves records in mass using apex. Below example just uses Account object’s record. Please feel free to update it as per your need.
-
Convert epoch to datetime in Apex
We get this requirement while coding several time to convert epoch time (Unix time) to Datetime. First thing, never store a epoch time in Integer and use Long always. Below given code can be used to convert into datetime: To get the epoch from a datetime variable you can just call the getTime() instance method:
-
How to generate PDF using Apex?
You can use the PageReference.getContentAsPDF() method in Apex to render a Visualforce page as PDF data. Then use Apex code to convert that PDF data to an email attachment, a document, a Chatter post, and so on.The following example is a simple three element form that selects an account and a report format, and then sends the…