Introduction to SalesForce Developer eXperience (SFDX)

Salesforce DX (SFDX) provides an integrated, end-to-end lifecycle designed for high-performance agile development.  It consists set of tools including Salesforce CLI, Second-Generation Packaging (2GP), Scratch Orgs,  VCS and CI support. Salesforce CLI The Salesforce CLI is a command line interface that simplifies development and build automation when working with Salesforce org. It can be used to; Aggregate […]

String Manipulation in Salesforce #1

Salesforce provide set of methods for String manipulation. This article explains usage of each function with examples.   Truncate strings with ellipses. abbreviate(maxWidth) returns a trimmed version of the String, of the specified length and with ellipses (…) appended if the current String is longer than the specified length; otherwise, returns the original String without ellipses. ‘Test […]

Loss of Fractions in Divisions

This is a small coding issue which can lead to serious calculation problems. When dividing numeric Integer or Long values, the fractional portion of the result, if any, is removed before performing any implicit conversions to a Double or Decimal. Eg – Double = 5/3; // Expected result = 1.6666666666666667 | Actual result = 1.0Double […]