Instantiating an Apex class based on dynamic string name with Type class
- Sep
- 30
- Posted by Lin
- Posted in APEX, Salesforce
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 moreUsing Aggregate SOQL queries/results in Batch Apex
- Sep
- 26
- Posted by Lin
- Posted in APEX, Salesforce
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 moreZip attachments only with Apex in Salesforce
- Sep
- 07
- Posted by Lin
- Posted in APEX, Salesforce, Visualforce
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 moreTo fix “portal account owner must have a role” Error in Salesforce Community Unit Test
- Aug
- 29
- Posted by Lin
- Posted in APEX, Salesforce, Unit Tests
In Salesforce, if you’re trying to run Unit Test with a Non-Role user, which includes part of creating Portal / Community User test data, the following error will be occured, that is because the portal account’s owner does not have a role to be assigned. System.DmlException: Insert failed. First exception on row 0; first error: […]
read moreCatching and customizing Apexpages Messages in Apex
- Jul
- 08
- Posted by Lin
- Posted in APEX, Visualforce
As we know, apex:pageMessages tag can be used to display all messages that were generated for all components on the current page, presented using the Salesforce styling, as the following source code we use: Controller Class(CommunitiesSelfRegController) Visualforce Page(CommunitiesSelfReg) But how do we customizing the styling of messages, if those were generated from Salesforce Standard components, […]
read moreUsing Custom Metadata Types and Custom Settings in Salesforce
- Jul
- 07
- Posted by Lin
- Posted in Custom Metadata, Custom Setting, Salesforce
Custom Metadata is one of the new features that released at Summer’15 of Salesforce, which is customizable, deployable, packageable, and upgradeable application metadata, and it supports the following custom field types. • Checkbox • Date • Date and Time • Email • Number • Percent • Phone • Picklist (Can’t use Global Picklist Value Set) […]
read moreTo Fix Error “Require TLS 1.1 for HTTPS connections” of MavensMate v6.0
- Jun
- 16
- Posted by Lin
- Posted in Other, Salesforce
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 moreFeature of running test with single/multiple testMethods – 2016/05
- May
- 27
- Posted by Lin
- Posted in Release Notes
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 moreBulk Approval Processing from List View in Salesforce
- May
- 13
- Posted by Lin
- Posted in APEX, 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 moreApproval Processing with Apex in Salesforce
- May
- 13
- Posted by Lin
- Posted in APEX, 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 moreRecent Posts
- Salesforce DevTools Release Notes (version 3.10.0) – mass edit custom fields on lightning
- Salesforce DevTools Release Notes (version 3.9.0) – Object Fields, SOQL Query Editor
- Salesforce DevTools Release Notes (version 3.8.0)
- Salesforce DevTools JUST HIT 10,000 USERS! THANK YOU!
- Using Promise for Apex Server-Side request in Lightning Component
Top Posts
- Salesforce DevTools – Powerful Salesforce developer tools, loved by over 50K developers - 222.8K views
- Date format and DateTime format - 206.9K views
- Salesforce Mass Editor (Chrome Extension) – Mass create, mass update, mass clone, mass delete on any list view. Support for both Classic and Lightning! - 159.6K views
- Setup an awesome Salesforce developer environment with Sublime Text 3 - 122.7K views
- Writing a Schedulable Batch Apex in Salesforce - 121.7K views
Categories
- APEX
- Apps
- Custom Label
- Custom Metadata
- Custom Setting
- Design & UI
- Event
- Heroku
- iOS & Object-c
- Lightnint Component
- Linux & Mac OS
- Metadata API
- Node.js
- Open Source
- Other
- PHP Framework
- Release Notes
- REST API
- Salesforce
- Salesforce DevTools
- Salesforce DX
- SOQL
- Tooling API
- Unit Tests
- Validation Rule
- Visualforce
- WordPress
You must be logged in to post a comment.