Instantiating an Apex class based on dynamic string name with Type class

Somtimes we need to instantiate a Apex class by dynamic value in Salesforce, which can make our program more modular and more readable, such as the below case : 1. Each Contact has its socail fields : “Type__c” and “AccessToken__c” 2. Needs to request its profile via socail api in Apex First we need to […]

read more

Using Aggregate SOQL queries/results in Batch Apex

In previous post, we had created a schedulable batch apex that implements Database.Batchable<sObject> in Salesforce, but if you want to use SOQL having aggregate functions like SUM(), MAX(), COUNT() on results grouped by “GROUP BY” clause in start execution, changing to interface Database.Batchable<AggregateResult> isn’t a workable way, because it fails with the below compile error […]

read more

Zip attachments only with Apex in Salesforce

Before this post (about 2 years ago), I’d shared a post that is about how to zip attachments with JSZip and Apex in Salesforce, and recently I found a more simple way to do that thing, which is only using an Apex library named “Zippex” ( view on Github). Here is the outline of my […]

read more

To Fix Error “Require TLS 1.1 for HTTPS connections” of MavensMate v6.0

Well, you may have found that MavensMate shows an error “Server raised fault: ‘UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization. Please use TLS 1.1 or higher when connecting to Salesforce using https.” as below, if you are using MavensMate v6.0 in Sublime Text 3,which is because Salesforce disabled TLS 1.0 encryption recently, for […]

read more

Feature of running test with single/multiple testMethods – 2016/05

The features of running test with single testMethod or multiple testMethods via Salesforce API have been released. Running Test with single testMethod Running Test with multiple testMethods Enjoy Tesforce. It’s better up here. ; )

read more

Bulk Approval Processing from List View in Salesforce

I have shared “Approval Processing with Apex in Salesforce” in previous post, and in this post, I’ll continue to share the way of bulk approval processing from Salesforce list view. The outline we need to do is as below : ・Add a custom button for list view ・Set List View Layout ・Add a Apex Class […]

read more

Approval Processing with Apex in Salesforce

An approval process is an automated process your organization can use to approve records in Salesforce. Usually we can request/approve an approval process through the standard approval process feature, but we can also do those things with Apex in some cases such as : request/approve from VF Page or from Custom Button. Here is Approval […]

read more