シナリオ -
ユーザーは、Soap API (enterprise.wsdl) を使用して Salesforce.com に接続する Web サイトを持っています。
ユーザーは、画像のアップロードに使用されるリッチテキストエリアカスタム項目のクエリを実行しています。
たとえば、Resolution__c が画像のアップロードに使われるリッチエリアテキスト項目である場合の SOQL クエリは次のようになります -
SELECT Resolution__c FROM myArticle WHERE ArticleNumber= '000001' AND PublishStatus='Online' AND IsLatestVersion = true AND Language='ja'
問題 -
上の API クエリの結果は、Salesforce の内部サーバに存在する実際の画像への html img 要素 (src 付き) です。
ユーザーがポータルでこのレコードにアクセスする場合、画像は表示されません。
ユーザーが Salesforce にログインしてポータルページを更新すると、画像が表示されます。
どちらも、API クエリコールを使用して実際のドキュメント本文を取得できます。この API クエリコールについて読み、Salesforce ナレッジに関連するリソースを確認してください。
2) Salesforce の記事を使用する場合、記事は REST API 経由で取得できます。これが完了したら、API クエリコールから返された img src を使用して、そのドメインを公開サイトのドメイン名に置き換える必要があります。
force.com サイトへのアクセス URL が以下の場合:
この例の img src を次のように変更します。
FROM (内部アクセスのみ)
TO (公開サイトへのアクセス)
http://mySite.force.com/servlet/rtaImage?eid=<ka0....>&feoid=<00N....>&refid=<0EM.....>
000385938

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.