Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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

share|improve this answer
add comment
up vote 0 down vote accepted

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();
    }
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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