0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Salesforce 画像をレコード内に表示

Last updated at Posted at 2022-08-24

初めに

項目の値によって画像を表示させる方法。
色々とネットを見れば情報は出てくるが、やろうとした時にうまく動かない場合もあるし(アップデートのせい?)
そもそもいつも忘れるので、現時点で動いた方法をメモ。

画像の登録

  1. 設定 → 静的リソースに登録しましょう
    image.png
  2. ファイルを表示をクリック
  3. 右クリックで画像のURLをコピー

カスタム項目&数式作成

  1. 画像を表示させたいオブジェクトにカスタム項目(数式 → テキスト)を作成
  2. ロジックに合わせて数式を作成する
    例では、チェックボックスに合わせて画像を表示させる
IF(checkBoxTest__c,
IMAGE("/resource/CheckIcon?","Assigned",30,30), 
IMAGE("/resource/CloseIcon?","Unassigned",30,30)
)

特に静的リソースから取得した画像URLは何も変える必要はありません。

IMAGE()関数の引数は、IMAGE(image_url, alternate_text [, height, width])となっています。

フローでの画像表示

静的リソースに登録した画像名を "表示画像"コンポーネント内の画像名に指定してあげるだけ。
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?