Loading
Salesforce Help 사이트 “Help Agent powered by Fin” 도입 안내더 많이 읽기
Tableau 고객 대상: Tableau를 이용하는 고객이 Help 사이트에서 사례(케이스)를 등록할 수 없는 경우의 대체 수단더 많이 읽기
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

Salesforce: Field Values Containing Commas Are Truncated When Setting Default Field Values via Custom Buttons

게시 일자: Nov 12, 2025
상세 설명

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.

Example: Custom Button Setup on the Account Object

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.

Scope of Support for Buttons and Formulas

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.

Knowledge 기사 번호

005227057

 
로드 중
Salesforce Help | Article