有効ではない Salesforce へのリクエストの具体例について > カスタムボタンの URL に日本語が固定文字として含まれる場合
カスタムボタンのURLに日本語が含まれる場合、ブラウザによっては URL エンコードされずにリクエストされることがあります。
文字コードは Unicode(UTF-8) で URL エンコードすることを推奨します。
具体的な設定例
/003/e?name_firstcon2="日本語"
このボタンが押下された場合、ブラウザの動作に依存し以下の様にリクエストがサーバ側へ送られます。
Chrome / Firefox の場合
日本語文字列部分が自動的にエンコードされ、サーバ側に害を及ぼさないようブラウザ側でもリスクを低減しています。
https://ap.salesforce.com/003/e?name_firstcon2=%E6%97%A5%E6%9C%AC%E8%AA%9E
IE11 の場合
日本語文字列部分がそのままサーバ側にリクエストされています。
https://ap.salesforce.com/003/e?name_firstcon2=日本語
実装方法としては、カスタムボタンに含まれる静的なパラメータを文字コードは Unicode(UTF-8) で URL エンコードしたものへ置き換える事が推奨されます。
上記の例では以下の様になります。
■変更前
/003/e?name_firstcon2="日本語"
■変更後
/003/e?name_firstcon2=%E6%97%A5%E6%9C%AC%E8%AA%9E
※なお、URLパラメータの利用自体が、ヘルプに記載のあるものを除き正式にサポートされておりませんので
ご理解頂きました上で利用頂けますようお願い致します。
参考記事: Salesforce Classic の URL パラメータを使用したデフォルト項目値を含むレコード作成ページの起動
000382023

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.