Sunday, March 23, 2014

CRM 2011 Dialogs Without a Record + Some Win32API

If you ever have the need/desire to have a dialog run without having to be under the context of a record, you can do so by creating a button, putting it in a ribbon on the main page of a given (or all) entity, and having it fire the following JavaScript (leave out the < >'s):

http://servername/crm/cs/dialog/rundialog.aspx?DialogId=<GUIDofDialog>&EntityName=<EntityName>&ObjectId=00000000-0000-0000-0000-000000000000

----

On a totally unrelated note, I'm doing some screen-scraping work and sending commands using the Win32API, I figured I'd pass along a little tidbit I've picked up.  If you ever need a quick guide to hex codes for capturing / sending commands:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

And to go with those, here are some controls (and functions, macros, etc.) that can be used in conjunction with those hex commands:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb773169(v=vs.85).aspx