How to use multiple substitute function in Salesforce?

We have to use nested SUBSTITUTE() methods for multiple replacing of characters.

Example:

SUBSTITUTE(SUBSTITUTE(Name," ", ""),"-","" )

In this example, we can remove "-" and space.

2 comments:

  1. its really simple and helpful

    ReplyDelete
  2. Hi,

    Can you please suggest on the below syntax:
    SUBSTITUTE(HomePhone,"\", "")
    I am unable to save this, An error like Missing " is displaying

    ReplyDelete