custom code (trying to use C#) is disabled for any button on my form...

I am trying to use that form in the context of a solution structured like this:

data is held in sharepoint lists, and list workflows make up the model layer, and views being shown as workflow process infopath forms. However, the infopath forms in this implementation seem to have custom code buttons disabled. Has anyone implemented something like this that would know what workarounds there are to this problem? If I have to change the implementation, how would you accomplish it?


1 Answer 1


Out-of-the-box (OOTB) workflow in sharepoint uses Infopath forms. Infopath form templates of types (compatibility) "Sharepoint List Form" and "Workflow Form" are by Microsoft design (or under- mis-design) locked, non-modifiable and do not permit client custom code (from Infopath Designer 2010 in VSTA, Visual Studio for Applications)

So, the answer, impossible and unsupported by design. To the best of my knowledge there are no workarounds except using custom workflow without Infopath forms or with Infopath forms of other custom types.

I shall not deepen in workarounds since I do not have much experience in them as well workarounds are to steer away from or break OOTB built-in sharepoint model and its functionalities. Then it is not the question on sharepoint

I have not hacked/tweaked Infopath forms for workflows but if to elaborate workarounds to limitations of OOTB Infopath forms (those with the use of GUI and wizards) by submitting through CAML XML templates, one might find useful:

  • I see. Thank you. If it is impossible with the choices I made, what is an alternative sharepoint solution structure that would meet the requirement of having the three DMV solution layers, if I had to choose a workflow type and infopath form type? **Data Layer - Sharepoint List **Model Layer - Workflow (A. list wf, B. site wf, C. reusable wf?) **View Layer - Sharepoint (A. sp list form, C. sp form library, D. sp blank form, E. Workflow form, F. Other?)
    – fa1c0n3r
    Aug 24, 2012 at 8:51
  • 1
    Added Update2 to my answer above Aug 27, 2012 at 7:22

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.