Auto-Resolution on Lookup using Javascript - Round 2 RRS feed

  • Question

  • Hey there!


    This question was already posted by Goktug-crmAkademi, but I don't think it was properly discussed and there wasn't a true answer to it.

    I ran into the same issue, and I'm wondering if I can be a bit more clear about it.


    So, basically I want to fill in a Product lookup with the "Product ID" (not the GUID), through Javascript.

    Then, I would like the lookup to resolve to the proper Product, since the "Product ID" is a valid field to perform the resolving of the lookup.


    My question is: If I can manually type the Product ID on the lookup, and it resolves to the Product, shouldn't it be also possible to:

    1) By Javascript, "type" the Product ID on the lookup?

    2) After typing the Product ID, resolve it?


    As it was mentioned on the other post, the FetchXml and Webservice invoking approach seems a bit "heavy" for such a simple thing...


    Thanks in advance guys.


    Francisco Ceia
    Wednesday, September 8, 2010 3:18 PM


  • Hi Francisco,

    Any columns ticked as a "Find Column" in a Lookup View will be searched when the user either (a) uses the Lookup Window to search, or (b) types a value directly into a lookup to auto-resolve.

    The following blog post describes an easy to use solution (less than 2 lines!) for setting a "default" value for a lookup and auto-resolving this through JavaScript:

    Hope that helps ... !

    The xRM Architect: http://the-xrm-architect.blogspot.com/
    Friday, September 10, 2010 10:26 AM