Using Custom Metadata Types and Custom Settings in Salesforce

Author Archives: Lin

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

Set Name field to be unique with Validation Rule

As we know, we can’t make Name field to be unique in Salesforce, and the Validation Rule is one of the solutions, as the blow code :

read more

Display Address type field on Visualforce Page

Address is an especial type of fields in Salesforce, which is a structured compound data type, that we can’t use it directly on Visualforce page. And there will occure a compile error like “Unsupported type: common.api.soap.wsdl.Address used in expression: record.BillingAddress”, if we did that. As the code sample below, we need to use fields BillingStreet, […]

read more

Fix ‘Error: Field is not writeable’ for Master-Detail relationship

An error “Error: Field is not writeable” will occur if you try modifying a Master-Detail relationship field in Salesforce Apex code. So how can we fix it? Maybe using the clone method to insert&delete is the only way, as the following apex code : Reference:Apex System SObject Clone Enjoy It!

read more

Salesforce DevTools – Powerful Chrome extension for Saleforce.com developer

Salesforce DevTools is a Chrome extension helping Salesforce.com developers do the below things: ・Exporting Objects API Reference to Excel file. ・Generating Salesforce data model (ERDs) as svg. ・Show / Hide object API name on object detail page by 1 Click. ・Quickly generate test data Apex Code and SOQL. ・Quickly access to new record page, list […]

read more

Determine odd or even row in apex:repeat loop

Sometimes we need determine if the index is odd or even in tag, such as showing table row in alternate color. There’s a simple soluton as below code: Enjoy it!

read more