>Command Prompt from Visual Studio


>I use the stsadm commands to add/deploy/upgrade/retract solutions. I got fed up with having to start a command prompt and then change directory to within the solution and then drill down to the project directory, where the wsp solution is found.

So instead (and I don’t know why I didn’t do this ages ago) I setup an External Tool within Visual Studio which will open up the command prompt within the currently selected project.
To do the same do the following:-
  • Open up Visual Studio
  • Click Tools->External Tools
  • Click Add
  • In the Title call it something like Command Prompt (Project)
  • Command: c:\windows\system32\cmd.exe
  • Initial Dir: $(ProjectDir)
  • Untick Close on Exit

If you wish to have the command prompt open within a different directory then put the path to that directory, there are all the variables which are available when using post build events such as SolutionDir.

To use select the project that you wish to open the command prompt in and then do Tools->Command Prompt (Project)

Enjoy!

>InfoPath Initialisation Form DatePicker and TextBox not working


>Recently I have been working more with InfoPath forms for Initialisation and Association data into SharePoint workflows. These forms allow you to define how you would like the workflow to work for example setup default text which is sent with the workflow when a user is asked to do something.

One little issue that I had which took some time to diagnose was the following:-
So I have a date picker which is used in an Initialisation form to let the user set a date when they would like a response by. Great however when you tried to use the date picker control is didnt work.

Even if I added other controls with their new xml elements those controls did not work.

After trying umpteen options I discovered that it was all to do with the AssociationData which is sent as part of the workflow feature, see workflow.xml element.

Using the sampledata.xml I copied over the missing xml element AssignTaskDueDate into the workflow.xml AssociationData section. After deleting the workflow within SharePoint and recreating then the DatePicker control stopped being disabled.

If you have any questions on this just drop a comment.