Hello,
I have a requirement that i have two entities A and B. Let say A contains name (text field) and B contains a field which has a lookup to A entity.
Now, i have a third entity which has two fields (both lookup fields) .Now , if i select name in one lookup ,then the lookup of other field gets filtered based on this.
How can i achieve this?
Thanks for any help!
*This post is locked for comments
Thanx Mam..I am done with it..
Mam,i am not getting Configurable properties for a field
Here is a short version:
- Open lookup control properties for "Field 3" on the form
- Find "Related Records Filtering" section
- Set up "only show records" correctly (to match Field 2)
Come on.. read that article.. we sent you the link twice:))
If it does not apply to your scenario, please explain why.
But i want filtered data in Field 3 based on Field 2 ..Can i?
Hi Alexa,
If there is a requirement as you described he/she has to use dependent lookup method
for that he/she can refer this link:
www.powerobjects.com/.../how-to-use-dependent-lookups-for-dynamics-crm-201320152016
Thanks,
Harry
Yes, but why using OData etc if you can simply go to the configuration screen for Field 3, set up the lookup field, and it'll work just like that?
Exactly , same scenario i have..and i have solved it and have the filtered data in an array using OData query..Just want help how to set that array to lookup field
If you have this:
Entity A:
Name
Entity B
Field1: Lookup to A
Entity C:
Field 2: Lookup to A
Field 3: Lookup to B
You can configure Field 3 lookup on the entity C form to display only those records which are referencing the same A which is selected into Field 2 (and you just need to follow the steps described in that article by PowerObjects)
Question is, if that's what you have..
Hello,
replace "new_linkedaccount" with schema name of your field
function preFilterLookup() {
debugger;
Xrm.Page.getControl("new_linkedaccount").addPreSearch(function () {
addLookupFilter();
});
}
function addLookupFilter() {
var fetchXml = '<filter type="and"><condition attribute="industrycode" value="8" operator="eq"/></filter>';
Xrm.Page.getControl("new_linkedaccount").addCustomFilter(fetchXml);
}
here in the fetchxml "industrycode" is lookup field based on what you get filtered data
Thanks,
Harry
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156