Skip to content
CYNOSYS

CYNOSYS

  • Salesforce
  • Javascript
©2019 CYNOSYS

Tag: apex

Categories Salesforce

Pattern Matching Strings in Apex (Regex)

Posted on May 11, 2022May 12, 2022by xenon
regex
This article demonstrates how to use Pattern and Matcher Apex classes in Salesforce. How do I extract URLs from HTML content in Salesforce? Sample HTML - <html> …
Continue reading "Pattern Matching Strings in Apex (Regex)"
Categories Salesforce

How to generate multipart/form-data request body for Apex HTTP Callout

Posted on February 23, 2021February 24, 2021by xenon
HTTP Callouts are used for integrating external REST-based services with Salesforce. Apex provides three built-in classes to work with HTTP services and create HTTP requests like …
Continue reading "How to generate multipart/form-data request body for Apex HTTP Callout"
Categories Salesforce

Convert 18-character Salesforce Id to a 15-character case-sensitive string

Posted on February 1, 2021March 3, 2021by xenon
In Spring 21 release, Salesforce introduced new method in System.Id namespace to convert 18 charater id to 15 character. String Id_15_char = '0D5B000001DVM9t'; String Id_18_cha…
Continue reading "Convert 18-character Salesforce Id to a 15-character case-sensitive string"
Categories Salesforce

String Manipulation in Salesforce

Posted on October 3, 2017March 7, 2020by xenon
Salesforce provide set of methods for String manipulation. This article explains usage of each function with examples. Truncate strings with ellipses. abbreviate(maxWidth) re…
Continue reading "String Manipulation in Salesforce"
Categories Salesforce

Loss of fractions when dividing integers in Salesforce Apex

Posted on September 11, 2017May 2, 2020by xenon
In Apex, this is a small coding issue can lead to serious calculation problems. When dividing numeric Integer or Long values, the fractional portion of the result, if any, is remov…
Continue reading "Loss of fractions when dividing integers in Salesforce Apex"
Categories Salesforce

Salesforce Coding Standards

Posted on August 7, 2017March 7, 2020by xenon
This is an unofficial list of Salesforce Coding Standards sourced from various guidelines & coding standards from the internet. Salesforce recommends following Java standards f…
Continue reading "Salesforce Coding Standards"
Search