In this article ,When user trying to add content type return s error,"null reference exception"
SPContentType test = web.AvailableContentTypes["Employee Details"];
newList.ContentTypesEnabled = true;
newList.Update();
newList.ContentTypes.Add(test);
SPContentType test = web.AvailableContentTypes["Employee Details"];
newList.ContentTypesEnabled = true;
newList.Update();
newList.ContentTypes.Add(test);
No comments:
Post a Comment