GlideNotification - クライアント

  • リリースバージョン: Washingtondc
  • 更新日 2024年02月01日
  • 読む1読むのに数分
  • GlideNotification API には、ページコンテンツの上にメッセージを表示する機能があります。

    GlideNotification メソッドにアクセスするには、g_notification グローバルオブジェクトを使用します。g_notification オブジェクトを使用するには、リスト V3 を有効にする必要があります。

    GlideNotification - show(文字列 type, 文字列 message, 数値 duration)

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

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

    単位:ミリ秒

    デフォルト: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!");