Thursday, October 23, 2008

Filtering Third Pary Lookups with Dexterity

In the past days I had been struggling with a programming issue that I thought could be resolved very easily with standard cross-dictionary development techniques. In fact, I was convinced that most of what I needed could be found in past materials published by my dear friends David Musgrave and Mark Rockwell. In reading through the material and going through the recipe of steps to implement third-party lookup filtering, I realized the technique was using reject record statements to avoid displaying records in the scrolling window, and while I was able to implement it, performance quickly became an issue.

Business Situation

In principle, I am developing a new piece of code for one of my clients that would allow them to transfer Project Accounting contracts to Field Service contracts. However, I needed to limit the contracts in Field Service only to the contracts for the selected customer.

Challenges

With the implementation of the technique outlined in Pushing the Limits III, the lookup would deliver the filtered results in over a minute! Not acceptable for me, not acceptable for the end-user.

Previously, I had filtered the Item Lookup window using a range where statement based on a few conditions my client needed to setup in Field Service, but this was much easier since the window resided in the DYNAMICS.DIC dictionary file. I was in fact sure that the technique outlined in Pushing the Limits III could be modified to use a range where statement, but was not sure how to accomplish it since the main issue was capturing a reference for the SVC_Contract_HDR (SVC00600) table buffer associated with the form, not any table buffer. To this point, I called my friend Mark -- David was sleeping at the time given the time difference -- and he pointed out that the client could use SmartFill to lookup any value typed in the Contract Number field associated to the lookup and that SmartFill would display its own lookup. Since my client owns SmartFill, this was certainly an option. However, this approach implied living with my inefficient lookup approach still, since I could not disable my lookup button.

Off I went to chat with David at COB and he pointed out that he had done this before. We started to brainstorm on the technique and he then realized that there were some challenges, but more than anything, realized that the Pushing the Limits material did not effectively address filtering third party lookups.

Giving David's nature, her came up with perhaps the ultimate article in Cross-Dictionary Third Party Lookups Filtering. Once again, David proves that the boundaries are just in your head and that the power of Dexterity as a customization tool truly relies on the ability to work around what can be many times considered as impossible.

Until next post!

MG.-
Mariano Gomez, MIS, MVP, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

No comments: