Hi,
Good day!
Was the problem resolved? if Yes, I want to ask HOW.
I have the same requirement and don't know how to achieve/implement it in Unified Interface. MS support suggests to use 'addCustomView' but how to identify the lookup control for user?
Thanks
Hi Rantala
Do you solve your problem.
I have some same problem, and I ref the source code github.com/.../source_v9.js
I can customize add existing button and add some customize filter and assoiciate the record add.
But I can't add link-entity with N:N relationship which lookupObject can't find the relationship entity.
Hi Ankit, sorry to bother you... im trying to do the same that is mentioned in the article, but in my case my old fetchXML customview was having link entities, im not sure if with the lookupObjects i can add a secondary filter for the link entity... :/
You need to write a javascript and register hat on Add existing Users button. In this javascript you need to launch the lookup modal window and set the parameters to it,as given in above document. We cannot locate the lookup window like that, as it is not supported to use any DOM objects.
Hope this helps
Thanks for your response, Ankit. There is a button "Add Existing user" on the subgrid. When clicked on this button, a lookup records window comes up, I want to map a view to that lookup control. I am unable to achieve that using Default view or using lookupObjects utility as I am unable to map them to that specific lookup control.
Need help in identifying that lookup control please.
The approach which you are using is not correct, as you are using the DOM element to find the control. So in UCI and web client , it will be different and it will change, as UCI is totally designed on different framework as compared to web.
You can achieve this requirement, either by creating a view for an entity and set it as a default view or if you want to use Javascript, then you need to register the javascript on add existing users button, which will show up look up modal.
Hope this helps.
Best regards,
Ankit
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Hi Ankit,
Thanks for your quick response.
In order to use setDefaultView or addCustomView, i need to getControl of the lookup field. In the classic interface when i inspect element of the lookup field i get id: "lookup_users" and using it, I am able to get control and can utilize addPreSearch and addCustomView, to fulfill the requirement.
However, in unified interface id shows as "lookupDialogLookup-MscrmControls.FieldControls.SimpleLookupControl-LookupResultsPopup_falseBoundLookup_8_textInputBox_with_filter_new" which I am unable to getControl of and use it to setDefaultView or addCustomView.
Hy Bhskar,
Hope this post finds you well and safe.
Can you use setDefaultView() method for this look up to show you filtered view on lookup modal window.
I am guessing that you have your own javascript registered on click on Add existing button on the subgrid, and trying to open a modal window and setting the filtered view in it.
In that , can you please try to use the setDefaultView function.
Thanks,
Hope this helps.
Best regards,
Ankit
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
André Arnaud de Cal... 291,391 Super User 2024 Season 2
Martin Dráb 230,445 Most Valuable Professional
nmaenpaa 101,156