Question

Is there a way how can I modify Lookup Address FetchXml on Quote/Quote Product entity? OOB functionality returns each Address record of Parent customer (Parent account) where AddressName contains data. Can I somehow pass my own fetchXml into this Lookup Address?

I know how to pass custom fetchXml into normal lookup by creating temporary custom view with my own fetchXml (e.g. http://lakshmanindian.wordpress.com/2012/05/22/filtered-lookup-in-crm-2011/). But address lookup is not on form but on dlg_lookupaddress.aspx so I can't use Xrm.Page.getControl(lookupFieldName).addCustomView() method.

Thank for any help.

Was it helpful?

Solution

Unfortunately there isn't a native way to override those dialogs. The good news is you can overwrite the filter criteria for the address lookup view through the customizations.

enter image description here

If that doesn't work for you then I would either overwrite the ribbon button and add a dialog of your own, or just add a different mechanism for choosing an address like listing the addresses of the customer in a web resource on the form. When you select an address from the list it just populates the corresponding values in the form so it would just be retrieving the list of addresses that meet your criteria, and populating the appropriate values via JS when selected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top