Sometimes, working with InfoPath can be a real pain. One of these times is when you accidentally hit the “Edit code” option. Even if you completely cancel out of the new programming window, you will soon realise that, if you want to publish your form on a SharePoint server to have it filled in on the browser, you won’t be able to.
The form will only be available to those who have the client installed.
In fact, if you do publish the form on a SharePoint server, you will face the following error message:
“The form template has been published to the server but it can only be opened in InfoPath Filler.The sandboxed solution could not be activated.The custom code in the form cannot be run.
This functionality may be deactivated on the server.”
I came across this helpful post by Paul Galvin that explains exactly what you have to do in order to get rid of the custom code so that you can re-enable the form to be filled in on the browser. However, it is probably referring to the older version of InfoPath.
If you’re working with InfoPath 2010 and you want to remove your custom code from the form in order to be able to publish it on a SharePoint server and allow for browser editing, you need to do the following:
Go to the developer tab, click on Language and in the dialogue box that opens up, select the “Programming” category on the left hand side list and then, click on the “Remove Code” button on the right hand side options.
Thank you, this was a great help
Happy to hear 🙂
You saved my day 🙂
=) glad to hear!
Thanks! This worked perfectly! I thought someone changed something on the servers,
It’s such a frustrating little thing! Glad you finally fixed it =)
Thanks! I thought I foobared the whole project!
No worries. It’s a bit silly that you have to go through this process, not exactly straightforward to think of it, but, yeah, it’s that simple to make it work again. Glad you found this helpful.
Thanks boet, i was ready to punch t punch the screen
hahaha =) Glad I could be of assistance. Don’t punch the screen 😛
Thank you so much, your post was a life-saver!
Ok.. after two phone calls to Microsoft and a post on the Technet with no answers this fixed my issue. I am definately giving you the credit on the post. Thanks much.
It’s always the little things, right? This had driven me crazy as well! I was so relieved when I found it.
Glad this helped you Dilbert.
One more Kudo. Good find on Google for Infopath 2010 & SP 2010 Enterprise. I’ll be back for more tips.
Thank you soo much. As a total noob to Infopath, you really saved me with this one!
That’s good to know. Good luck and have fun coding!
@MGR,
I spun my wheels for days trying to resolve this issue and was as simple as this. Thanks for this post!
You’re welcome. I’m glad you were able to make it work in the end.
Great… I was struggling with this from long
It’s a frustrating thing, I know! Glad you found this helpful 🙂