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 5 years have passed since last update.

SharePoint Client Object Model でサイト オブジェクトを取得するコード

Posted at
// コンテキスト取得
var custCtx = SP.ClientContext.get_current();
 
// サイトオブジェクト取得指示
var custWeb = custCtx.get_web();

// サイトオブジェクト取得予約
custCtx.load(custWeb);

// サーバーへのクエリー実行(ここまでのコンテキストに含まれる指示予約を送信)
custCtx.executeQueryAsync(
    function(sender, args) { // クエリー実行時コールバック処理
        console.log(custWeb);

        // ここで各種処理

    },
    function(sender, args) { // クエリー失敗時コールバック処理
        console.log('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    }
);
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?