If you were doing this in Dynamics, were is the window? How would you open it manually?
Generally, the key is to populate the key field after you open the window. Also, there are methods that you can call to open the window directly and pass a pameter
See:
http://vstoolsforum.com/forums/p/67/135.aspx#135
It's not documented very well, though, that's why we have this forum. Please, if you find answers, post them here. Not just for this question, but anything the community might use.