SP2013. I have a custom rendering template for a Content Type in CONTROLTEMPLATES folder. Problem is that when I deploy solution by VS on a development machine this template doesn't show up on a form. But after I deploy solution again it shows up. I have following code in FeatureActivated event receiver:
SPContentType ct = web.ContentTypes["MyContentType"];
ct.NewFormTemplateName = "NewListForm1";
ct.EditFormTemplateName = "NewListForm1";
ct.DisplayFormTemplateName = "DispListForm1";
ct.Update();
When I check NewFormTemplateName property in PowerShell it has correct value: "NewListForm1" after the first deploy. But rendering template shows only after second deploy.
Now I need to install feature on a production server, but I'm stuck with this problem - no custom rendering tamplate, only default. I've also tried to reactivate feature several times.
Any ideas?

0 commentaires:
Enregistrer un commentaire