View other parts:
- SharePoint Workflow Designer Tips P1
- SharePoint Workflow Designer Tips P3
- SharePoint Workflow Designer Tips P4
- SharePoint Workflow Designer Tips P5
One of my favorites features in SharePoint Designer is the ability to add notes for you and others to later open the workflow code and understand what is happening.
You can add comments inside SharePoint Designer by adding an action called Add a Comment.
It is always good practice to make sure to add comments that describes what you are doing inside your code.
When writing workflows using SharePoint Designer, you usually need to create many variables.
Make sure that all your variables have names that are descriptive. Adopt naming convention for your variables. If you are using web service calls, try to prefix the variables needed for the web service with something like (WebService…).
When you create an item in a list, workflow designer will automatically create a local variable of type GUID called (create) that represents the GUID of the item created by the workflow designer on that list.
What I usually do is to create a variable with type GUID, and called it (MyReports GUID) and use it instead of the automatically created on. I then go and delete the variable called (Create). This way, my variables will be more descriptive.
Sometime, when you are beginner in writing workflows using SharePoint designer, you will end up with many variables that are created and not used inside your code. Keep an eye on those orphan variables and delete them as soon as you can so that you do not confuse yourself. This will make it easier for you and others to review your code later and get an idea about what’s going on.