Friday, June 11, 2010

Finding CRM 4.0 Entities with Attachments by Querying annotationBase Table

I needed to find all of the inactive records for an entity that had documents attached:

 

SELECT COUNT(*)
FROM   new_myEntityBase t
       JOIN annotationBase ab
         ON t.myentityid = ab.objectid
WHERE  statecode = 1 

Tuesday, May 11, 2010

Move Flex Alert.show on the screen

I have a tall Flex application that uses Alert.show( ) to display error messages.  This created problems when the error messages were centered on the screen, but not visible when the screen was at an extreme scroll position (top or bottom).  To solve this, I capture the MouseEvent and use it to set the Alert’s “Y” position.  Note this code did not work UNTIL I used the PopUpManager.centerPopUp prior to moving:

 

var errorMsg:Alert = Alert.show(errmsg,"Error", Alert.OK, this);

PopUpManager.centerPopUp(errorMsg);

 

var mousePt:Point = new Point(event.localX, event.localY);

mousePt = event.target.localToGlobal(mousePt);

errorMsg.move(errorMsg.x, mousePt.y - 50); // try to vertical center it at button

Tuesday, May 4, 2010

Compiling the CRM SDK CrmServiceUtility Class without Web References

According to Shan’s Blog post Using CRM SDK Instead of Web References, it is often preferable to use the SDK classes instead of the proxy classes generated when you add web references. Using the CrmServiceUtility class found in the 4.0 SDK in the \server\reference\cs folder is a perfect case in point. The way the code is written, you can compile it without a web reference simply by adding references to Microsoft.Crm.Sdk.dll, Microsoft.Crm.SdkTypeProxy.dll, and System.Web.Services and two using statements:

using Microsoft.Crm.SdkTypeProxy;
using Microsoft.Crm.SdkTypeProxy.Metadata;

Thursday, March 11, 2010

Google Maps and Flex are beautiful together

All I can say is WOW! Working with Google Maps in ActionScript is SOOOO much easier than HTML/JavaScript. In 5 minutes I had a working map and in 20 minutes of Google examples I had this:

I am sold.

Sunday, February 28, 2010

EveryTrail.com GPS Visualizer

I went for a mountain bike ride today (the trails are finally dry enough) and I was packing my Holux GPS to record the trek. I was running the new GPS Sport Tracker softare on my Windows Mobile 6.0 phone and the logs are in GPX file format. I found EveryTrail.com that will create a Flash animation of your GPX trip:

45 Minutes in Powhite


Map your trip with EveryTrail

Wednesday, February 24, 2010

Windows Mobile GPS Sport Tracker Software

I just discovered an excellent free (donations accepted) GPS software for Windows Mobile phones called GPS Sport Tracker.  It has amazing features for running, biking, hiking, boating and probably many other things.  I can’t wait to get this in the boat and fine tune the sail adjustments.  The features I particularly like are:

  • Speed in 1/10s of MPH
  • Distance travelled
  • Average/Max speed
  • Elevation change
  • Data logging to GPX file format
  • Maps of your track
  • Profile of your elevation

This is fantastic work!

 

Tuesday, February 23, 2010

New in Tomcat 6.0.19 - Realm lock-out feature

NOW they tell me.  Man it pays to RTFM...

http://www.jeremythomerson.com/blog/2008/11/apachecon-securing-apache-tomcat-for-your-environment/

New in 6.0.19 [the] LockOut realm - it wraps around standard realms and provides a lock-out mechanism for multiple failed attempts for the same user.  With this, there will also be the ability to have multiple realms for authentication - if any match, you get access - so you could use, for example, a tomcat users file for admins and a JNDI realm for users.

Full details here:
http://tomcat.apache.org/tomcat-6.0-doc/config/realm.html

You just wrap this around your existing realm (JDBC in our case).  I got this working and it will serve as a "backup" to my custom login attempts table.  The LockOut realm will prevent a brute force attack that hits the JAAS servlet directly.