GlideNotification - クライアント

  • リリースバージョン: Xanadu
  • 更新日 2024年08月01日
  • 所要時間:1分
  • GlideNotification API は、ページコンテンツ上にメッセージを表示するメソッドを提供します。

    g_notification グローバルオブジェクトを使用して、この API にアクセスします。g_notification オブジェクトを使用するには、リスト V3 を有効にする必要があります。

    GlideNotification - show(文字列型, 文字列メッセージ, 数値の期間)

    指定された文字列を指定されたタイプのメッセージとしてページコンテンツに表示します。期間タイマーが期限切れになると、メッセージは削除されます。

    注:
    スコープ対象のアプリケーションでこのメソッドを使用する場合は、関連する名前空間 nowapi を指定する必要があります。例: nowapi.g_notification.show("info", "The record has been updated", 10000);
    表 : 1. パラメーター
    名前 タイプ 説明
    type 文字列 表示するメッセージのタイプ。
    有効な値:
    • error
    • 情報
    • 警告
    メッセージ 文字列 表示するメッセージ。
    期間 番号 オプション。メッセージを表示する時間。

    単位:ミリ秒

    デフォルト:5,000

    表 : 2. 返される内容
    タイプ 説明
    なし
    // 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!");