GlideNotification - クライアント
GlideNotification API は、ページコンテンツの上にメッセージを表示するメソッドを提供します。
g_notification グローバルオブジェクトを使用して、この API にアクセスします。g_notification オブジェクトを使用するには、リスト V3 を有効にする必要があります。
GlideNotification - show(文字列タイプ, 文字列メッセージ, 数値期間)
指定された文字列を指定されたタイプのメッセージとしてページコンテンツに表示します。期間タイマーが期限切れになると、メッセージは削除されます。
注:
スコープ対象のアプリケーションでこのメソッドを使用する場合は、関連する名前空間
nowapi を指定する必要があります。例: nowapi.g_notification.show("info", "The record has been updated", 10000);| 名前 | タイプ | 説明 |
|---|---|---|
| type | 文字列 | 表示するメッセージのタイプ。 有効な値:
|
| メッセージ | 文字列 | 表示するメッセージ。 |
| 期間 | [Number (番号)] | オプション。メッセージを表示する時間。 単位:ミリ秒 デフォルト:5,000 |
| タイプ | 説明 |
|---|---|
| なし |
// Displays an info message at the top of the screen
g_notification.show("info", "The record has been updated", 10000);
// Displays an error message at the top of the screen in a scoped app
nowapi.g_notification.show("error", "You need to provide notes!");