How to remove the Currency symbol using suite script when using the Amount (Foreign Currency) field?

If you want to get rid of all punctuation and symbols from a number field except comma and negative symbol, try this regex

let result = Field_name.replace(/[^\d\.\-]/g, '')

Leave a comment

Your email address will not be published. Required fields are marked *