LoginSignup
3
0

More than 3 years have passed since last update.

Visualforce ページでLightning風のエラーメッセージを表示する

Last updated at Posted at 2019-05-12

Salesforceでエラーメッセージを表示する際、Lightningのデザインを使うときのメモ書き。
lightningStylesheets="true"にすることで使用できる。

完成表示イメージ

Visualforce ErrorMessage.png

手順1

Salesforceを開く

手順2

開発コンソールを開く

手順3

File -> New -> Visualforce Page を選択。
ファイル名に適当な名前をつけ以下のソース貼り付けて保存。

<apex:page lightningStylesheets="true">
<apex:pageMessage severity="Error" summary="Error message on page" strength="1"/>
<apex:pageMessage severity="Confirm" summary="Confirm message on page" strength="1"/>
<apex:pageMessage severity="Info" summary="Info message on page" strength="1"/>
<apex:pageMessage severity="Warning" summary="Warning message on page" strength="1"/>
</apex:page>

手順4

設定からVisualforceページを選択。先程作成したVisualforceを選択して、プレビューで確認。

3
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
3
0