ロングテキストエリア項目において、UI上での改行が2文字扱いとなり、文字数制限超過エラーが発生する事象について説明します 。
Salesforce UI でテキストを編集する際、改行(Enterキーの入力)は「改行」と「復帰」の2つの記号として扱われ、2文字分としてカウントされます 。
一方、フロー(Flow)などの自動化処理では改行を1文字(ラインフィード:\n)として扱うため、内部処理とUI操作で文字数の認識に乖離が生じます 。
文字数制限の境界に近いデータを扱う場合は、以下の点に注意してください 。
1.文字数制限に余裕を持たせる
• 自動化処理で入力するテキストは、UIでの編集を考慮し、制限文字数(例:300文字)よりも十分に少ない文字数に収まるよう設計、もしくはロングテキストエリア項目の文字数制限を、想定される最大文字数よりも余裕を持たせた値に設定する
2.改行を削除または置換する
• UIで保存時に「データ値が大きすぎる」というエラーが表示された場合は、不要な改行を削除して文字数を減らします 。
005237044

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.