none
Infopath custom code? RRS feed

  • Question

  • I'm working with a Sharepoint project that was migrated from 2007 to 2010. There is not history on who originally created the project or how they did this. So, if the original developer used a Visual Studio project to add custom code to the form, that VS project does not exist.

    Is there any way to tell if an existing form has custom code written for it? If I want to add my own custom code, the only way I can do this is go into the form properties and select "remove existing code". Then I can create a new project and add code.

    Is it the case that if I cannot find the original VS project, that this is my only choice...to remove any existing code?
    • Moved by Marvin_Guo Friday, April 25, 2014 6:18 AM
    Thursday, April 24, 2014 4:48 AM

Answers

  • Hi,

    I’m afraid that you can’t add custom code in a deployed form template. you should find the original Visual Studio project to make changes.

    The form code for an InfoPath managed code form template is compiled as an assembly that runs under the common language runtime (CLR). This means that whenever you need to make changes to the form code, you must open its project in Visual Studio 2012, make changes in the code editor, recompile your form template, and then re-deploy the form template.

    More information, you can refer to MSDN article below:

    http://msdn.microsoft.com/en-us/library/aa946782.aspx

    Regards,

    Marvin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Marvin_Guo Wednesday, April 30, 2014 8:39 AM
    Friday, April 25, 2014 6:59 AM