Tuesday, September 1, 2009

Run as Different User in Windows 7

In windows XP, when you wanted to run as a different user you could by right-clicking and selecting "Run As", in Windows Vista this was missing – although you could use the RunAs.exe in command line to kick off an application as a different user – it was really annoying and painful to do.

Now in Windows 7, Run As is back!

To run as a different user, simply hold down shift and right click on an icon to get the "Run as different User" option.

Very useful in MS CRM for testing our roles for different user.

Matt.


 

Friday, August 28, 2009

Access denied to something? – try changing your password


 

One thing that I've found time and time again with Windows authentication is that even though you have access to something and your password is not expired – you may still received the "access denied" type response from different applications/services.

At first you think it's some kind of issue with permissions, you try rebooting etc... But nothing works.

In these circumstances, if you have noticed that you are being reminded to change your password when you log onto the windows server/workstation – then changing your password may be the key!

It seems that although technically your account on the domain hasn't expired - because it's due to expire this sometimes seems to be interpreted as the same thing (i.e. it considers your account expired). Perhaps the underlying integrated security authentication that goes on behind the scenes doesn't always deal with this situation properly, and just rejects by default.

Anyway, try changing your password and see if that helps!

Matt.

Tuesday, July 14, 2009

Version 1.1 Final of LINQ to SQL Entity Base Released

Hi everyone,

I've released the latest version of the LINQ to SQL Entity Base. If you are unfamiliar with it, it allows you to have change tracking without having to have the DataContext object within scope.

Here's the changes since Version 1.0

Improvement: Implemented caching for reflected properties which should significantly speed up creation of entity instances. Thanks Johannes!

Improvement: If you delete an entity while it is in the new state (and therefore has not been submitted to the database yet), the entity will now be removed from the scope of the entity tree during the call SyncronisationWithDataContext(), and as there are no references to the entity anymore it will be garbage collected. Before this change, the object would still hang around.

Bug Fix: Issue where setting a value FK value via object reference did not result in entity being flagged as modified unless you modified another property on that entity as well.


Anyway, head on over to codeplex to check it out.

Cheers

Matt.

Saturday, July 4, 2009

Javascript showModalDialog() - Not impressed

Recently I was working on an ASP.Net page to put in an IFRAME for Microsoft CRM. I had a requirement to choose a CRM systemuser from a list, and so naturally I went looking for a way to do this.

I stumbled across showModalDialog() and thought it was the way to go as it offered a Modal Dialog window which I could put to any URL and also could return any result I wanted back to the calling window really simply.

So, everything seemed to work great, but as it turns out, it IE 8 seems to cache the Dialog window so everytime that you start it up it would show the very first window that you had that ever used it (not just for that session, but the very first time you used the window with that URL). This was really odd, I tried several methods for stopping the caching but none of them seemed to work - even changing the URL to be unique every time didn't even stop it!

At the end of the day I gave up after finding out so many other people were having problems with it, and that it's functionality and become "flakey-er" as new revisions of IE were released (I also discovered that it's an IE only feature).

I ended up just re-arranging my base page (the one that i put in the IFRAME) to include the some functionality.

From now on I'll be avoiding the showModalDialog() - as I wouldn't be surprised if it doesn't work at all in the next version of IE. And although I ended up not using any type of Modal in this instance, I did find examples of how it's possible to do it with standard (non IE specific) code.

Lesson Learnt!

Saturday, April 25, 2009

Project your class attributes into a data table.

A friend of mine has written a small tool which allows you to project attributes of your classes into a data table, which you can then use for data binding or reporting. The main reason for doing such a thing is to help out with sorting without having to re-bind the data between sorts.

If your in need of such a thing, please follow this link:

http://code.google.com/p/modelshredder/

Tuesday, March 24, 2009

CRM 4.0 Many to Many Importer Tool

Hi everyone,

I was surprised there didn't seem to be any easy way to import N-N database relationship data into the database, and as you can't do it yourself via T-SQL inserts I have written a tool to import many to many relationship data (N – N) into the database – which may be helpful for someone out there.

The project has been published on Codeplex Here along with the instructions on how to use it.

Cheers

Matt.

Monday, February 23, 2009

CRM 4.0 Picklist Generator Tool

Hi everyone,

To generate the picklist options in the application I work on, i'm always using the CRM 4.0 Picklist Item generator created by http://marioraunig.blogspot.com/, which I think is a great tool - quick and easy!

Often however I find that I need a few more features and so i've written my own utility for generating these codes, which over time I plan on adding more features too.

Find it here:

http://www.codeplex.com/CRMPicklistGenerator



For the moment, I've added the following features which I've found useful....

1. You can specify which number to use as the picklist value.
2. Options are specified as

[value], [description]
OR
[value],"[description]"

where [value] is the underlying value (int) and [description] is the pick list option description that's shown to the user.

3. You can sort by the description (deals with comma's in description as well).
4. You can specify which language code you want the list to use.
5. Allows comma's in descriptions and removes quotes

In order to use it,

1. Generate the option list
2. Open up your customization.xml file in Notepad or Visual Studio
3. Find the appropriate section of the xml file
4. Paste the generated option list into the xml file
5. Re-import the customization.xml file.

Anyway, hope it's handy for someone out there...

Cheers

Matt.