When you create Salesforce custom buttons or links that pass default field values to a record create page, currency or number fields that contain commas are not parsed correctly as URL parameters. This results in values being truncated after the first comma.
For example, if a number field contains "1,234,500", only "1" is copied, and the values after the comma are lost.
To resolve this issue, you must encode the field value using the TEXT and URLENCODE functions.
This article answers the question of why number or currency values with commas are cut off when a Salesforce custom button passes default field values, and how to fix it. When you pass a number field as a default field value in a custom button URL, use the URLENCODE and TEXT functions if the value contains commas. This prevents the comma from being misinterpreted as a URL special character (delimiter) and ensures that the entire value, including everything after the comma, is copied correctly.
The following example shows a URL for a custom button that creates a new Account record from an existing one. It passes the value of a number field (for example, Number_Field__c) from the existing Account to the same field on the new record as a default value.
/lightning/o/Account/new?defaultFieldValues=Number_Field__c={!URLENCODE(TEXT(Account.Number_Field__c))}
In this URL, the TEXT function converts the number to text, and the URLENCODE function encodes special characters such as commas so that they are passed as part of the value. By wrapping the field with TEXT and URLENCODE as shown above, even if the value of Number_Field__c contains commas (for example, "1,234,500"), the entire value is correctly populated in the new record's field.
Note: Support for buttons and formulas is limited. For more details, refer to the "Scope of Support for Buttons" and "Scope of Salesforce Support for Formulas" articles listed in Additional Resources.
005227057

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.