Created
February 19, 2013 09:44
-
-
Save kawakawa/4984461 to your computer and use it in GitHub Desktop.
SharePointで「値が有効な範囲にありません。」エラーが発生した時のソースサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (SPSite site = new SPSite(context.SiteUrl)) | |
using (var web = site.OpenWeb(context.WebUrl)) | |
{ | |
var list = web.Lists[context.ListId]; | |
var item = list.Items.GetItemById(itemId); | |
var value = item["フィールド名"]; //ここで例外が発生 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment