0

For some reason xsm form doesn't remove from Manage Form Templates on Feature deactivation process, so looks like I should handle it myself. Can someone tell how to do this programmatically?

2 Answers 2

1

Here are a couple of things you can try:

1) Go to Central Admin and check if the InfoPath form deletion job is stuck. If it is stuck stop it and try again.

2) Stop the SharePoint Administration service and open the SharePoint PowerShell command line. Execute the following command.

stsadmin execadmsvcjobs

Start the SharePoint administration service.

I hope this helps

0

So I've found solution like this.

FormsService formsService = SPFarm.Local.Servers.GetValue<FormsService>(FormsService.ServiceName);
foreach (var ft in formsService.FormTemplates)
{
    if (ft.Name == "Your XSN Form Name Here")
    {
      ft.Deactivate();
      ft.Delete();
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.