My team have built a fair few portal web forms in our current project and, over time, we have learned a few lessons. So, if you are about to launch into building web forms for a project, here are some pointers that may assist.
Plan Out the Web Form
The best lesson I learned from the first year computing course I did at university was to plan before you code (or in this case configure). It is very easy for a web form to get complicated very quickly, especially if there is branching in the form. Plan it out, simplify it where you can so you do not tie yourself in knots.
Use a Custom Entity
We have learned the hard way not to link web forms directly to, say, the Case entity. The problem is, as the number of web forms increases, the number of fields blow out. Putting them all on the one entity is a recipe for disaster (while substantial, there is a limit to the number of fields permissible on an entity.) Store web forms on a custom entity and use workflows to ‘convert’ them (you can always add form values to the Case description field after all). Use the same entity for groups of web forms where it makes sense i.e. where the same fields are used again and again. The other advantage of this approach is you get a definitive record of what was actually entered into the form before the Dynamics Users get a hold of the data.
Build the Web Form Backwards
The web form requires a starting step and each step needs to know the next step to go to. So if you build them in order, you have to remember to go back and link them all up. The alternative is to build the steps in reverse order.
Web form metadata provides a simple, yet powerful way to modify the behaviour of the web form steps. Learn what metadata can do. You will be pleasantly surprised.
Get a Good Developer in Your Corner
Configuration and metadata can only get you so far. Get a good developer in your corner for when you need to do something REALLY clever. Remember though, clever does not always come cheap.
Another lesson from the school of bitter experience, is to adopt conventions for your web form configuration. Have conventions on how you name the entities, CRM forms (are they used by multiple web form steps, for example), web forms, web form steps and so on. A little bookkeeping up front will save a lot of headaches later on.