Friday, March 26, 2010

Visual Studio Tools for Dynamics Templates not showing up in IDE

Again, we are back with a work-around to a Windows 7 / Visual Studio issue.

In the original version of Visual Studio Tools for Dynamics GP 10, the installer only includes Visual Studio 2005 templates. It flatly refuses to install these templates on Visual Studio 2008, so you have to uncheck it to install.

Now what is the point of installing the Visual Studio Tools if you must choose NOT to install the main part of the program (and only interface) to continue??????

In order to get them to show up, I went into the control panel, selected "Visual Studio Tools for Dynamics GP 10.0 SDK" and clicked Change. I then chose Add/Remove Components and checked the Visual Studio 2008 Templates. After the install completed, I had the appropriate objects in Visual Studio.

After some poking around, I discovered that SP2 and later of the toolkit includes the templates for Visual Studio 2008. When you run the SP installs, there is a minimal install interface (Just continue and done). So you would expect the templates to be there after the patch, right? Wrong! Since you had to uncheck the templates during the initial install, they remain unchecked after the patch.

To recap, the steps are:
1. Install the Visual Studio Toolkit with the 2005 Templates unchecked
2. Install Visual Studio Toolkit SP2 or greater.
3. Use Add/Remove programs to add the 2008 templates.


There may be a better way to do this, and I can't find any documentation on what Microsoft actually intends for you to do about it, but this seems to work fine.


Happy Friday!


Did this help you?  If so, please leave a comment!

Wednesday, March 24, 2010

Getting SharePoint to use multi-line text fields for calculated fields

Requirement: Trim, truncate, or otherwise modify the text from one SharePoint list field to make it appear in another.
Solution: Make the new field a calculated field and enter the formula, referencing the original field in [brackets].
Obstacle: Text functions in SharePoint list columns do not work properly on multiple line text columns.

The work-around here is to trick the new SharePoint list field into thinking it is operating on a single-line text field. While it is true that the text functions don’t work perfectly for multiple line text fields, they are adequate for simple tasks such as truncation. The issue is that SharePoint validates the calculated field when saving and throws an error if the function refers to a multiple line text field, preventing the save operation.

So how do you trick it?
1. Create Field1, single line text
2. Create Field2, calculated field, formula=RIGHT([Field1],LEN([Field1])-8)
    (this gets rid of the html tag that will appear at the beginning as an artifact of operating on a multiple line text field)
3. Create Field3, calculated field, formula=LEFT([Field2],50) & “…”
    (this will display the first 50 characters of the original field follows by the ellipse)
4. To prevent validation, do this from the site settings window
     a. Delete Field1
     b. Create Field1, multi-line text
5. Create a custom view and hide Field1 and Field2 and set it as the default view
     (they will still appear in the item view, but not in the edit window since they are calculated fields)

There you have it. Steps for tricking SharePoint into doing something it was designed to do, but prevented from by poor validation logic.  Now how to we trick those MS Devs into removing that erroneous validation logic?

Enjoy.


Did this help you?  If so, please leave a comment!

Thursday, March 4, 2010

Tweak Windows 7

Windows 7 treats minimized apps differently than previous versions.  This can be nice if the program was written for Windows 7, but what if it wasn't?  Chances are, you will need to put the smack down on Windows 7 for these apps.

Basically, Windows 7 allows you to change the way an application behaves, fooling it into thinking it is on an earlier version of Windows.  It just doesn't make it very obvious while the application is running.

So first, close that application.  Then find the executable file for it (you may need to look at the properties of the shortcut for this).  Navigate to the executable in windows explorer, right click on the file, and choose properties.  Click the Compatibility tab and check the "Run this program in compatibility mode" option, then choose the version of windows that made you happy.

That's all there is to it.  The application should now behave as it did in that previous version of Windows.

Notable examples that this fix works great for:
 - Live Messenger does not minimize to the tray in Windows 7.



Did this help you?  If so, please leave a comment!

SQL 2022 TSQL snapshot backups!

  SQL 2022 now actually supports snapshot backups!  More specifically, T-SQL snapshot backups. Of course this is hardware-dependent. Here ...