1

This is my code Please help ( I am also creating contentType,siteColumn,views For library, creating fields for contentType,every thing is going correct except ContentType is attaching with list.

public static WebModelNode DeployLists()
{
    return SPMeta2Model.NewWebModel(web => {web.AddList(ListDefinitions.TrackingRegister, list => {     list.AddField(SiteColumns.YMAInvestigation).AddField(SiteColumns.YMContactEmail).AddField(SiteColumns.YMProductionLocation).AddContentTypeLink(ContentTypes.ClaimTrackingContentType).AddListView(Views.TRView); }); });
}
  • where is the code ?? :) – Mohamed El-Qassas MVP Dec 2 '16 at 11:23
  • public static WebModelNode DeployLists() { return SPMeta2Model.NewWebModel(web => { web.AddList(ListDefinitions.TrackingRegister, list => { list .AddField(SiteColumns.YMAInvestigation) .AddField(SiteColumns.YMContactEmail) .AddField(SiteColumns.YMProductionLocation) .AddContentTypeLink(ContentTypes.ClaimTrackingContentType) .AddListView(Views.TRView); }); }); } – G.Srinivas Dec 2 '16 at 13:54
  • M.Qassas , please see my above comment – G.Srinivas Dec 2 '16 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.