I'm trying to embedd a Nintex Form for a list into a site template which i save with "Save site as Template".
When i create a new subsite from this template, the Nintex Form exists for the list, but it is only shown if i edit the form and publish it, otherwise the default Sharepoint Display Form is shown.
Can anyone tell me how i can publish the Nintex Form after the site is created?
I'm creating the site with C# SSOM in an event receiver.
Thanks in advance
Solved! Go to Solution.
did you have a look at this post: Is there a way to deploy a Nintex Form from a script (like powershell or feature) instead of a Expor...
It explains how to publish a Nintex Form from code.
If you just need to change the form you can set the 'DefaultDisplayFormUrl', 'DefaultEditFormUrl' and 'DefaultNewFormUrl' properties of your SPList object but it sounds like the form needs to be published again.
Let us know if it works for you!
Thank you for your fast answer! The following code works for me:
var service = new NfWcfService();
FormInfo formInfo = service.GetForm("New Item", listId);
service.PublishForm("New Item", listId,formInfo.Form);
In my case the content type is "New Item" instead of an existing content type id.