Notifications
Announcements
No record found.
Hi All,
I have requirement to set another lookup instead of associate lookup coming here bydefault. kindly let me know the supported way to done it.
*This post is locked for comments
i think what you want to do is something like this:
http://inogic.com/blog/2015/08/apply-custom-filter-on-lookup-field-in-dynamic-crm-using-script/
http://www.magnetismsolutions.com/blog/nathaneccles/2013/09/30/crm-2013-javascript-lookup-filtering-using-addcustomfilter
best regards
Tobias
Hi Koller, Thanks to help me on this. but no i dont want this one.
i want to set view to the lookup. as did in below link using unsupported way. but same thing looking in supported way. is it possible.
nycrmdev.blogspot.dk/.../changing-default-view-of-inline-lookup.html
yes, you can simply call this:
Xrm.Page.getControl("parentaccountid").setDefaultView("{61273827-328E-E011-95AE-00155D9CFA02}");
The Id is the id of the view you want to auto-select.
the easiest way to find out the id of the view is to open the lookup-view and check the picklist inside the dom:
I am in new in javascript can you please explain me step by step where i have to use javascript in crm. please help me to solve this. Thanks in advance.
well I don't know your skills but i will try to explain:
you simply have to call this function in your onload-function of the form:
1. Create a webresource (Javascript-File) in CRM
2. Put the following code in your newly created webresource (Change the "parentaccountid" with the Name of your lookupfield and Change the ID of the view to your view's id)
function setLookupView() { Xrm.Page.getControl("parentaccountid").setDefaultView("{61273827-328E-E011-95AE-00155D9CFA02}"); }
3. open the form-Editor of the entity you want to run the script in
4. open Form-Properties and add the webresource
5. add Onload-Function
that should do the Magic ;)
Thanks Koller, but i dont have lookup on form, i have marketing list grid on contact form.
When i click on "+" button of marketing list grid its shows that window lookup for more record and view is selected bydefault i want to change there.
Lookup is not there directly on form. hope you understand my problem.
If require please let me know to put all screen step by step.
ok, now i see your problem ;)I just tried to set the filter to the inline-lookup and it worked as followed:This script is only using supported ways!The only little "disadvantage" is that the script has to check every (here 500ms) if the lookup is available because the lookup is added dynamically to the dom.But this shouldn't cost to much performance. You could also increase the 500 if you want to (f.e. 1000).You only have to adjust two fields:1. set the control-name (here "lookup_Marketinglists") to the name of your Marketing-subgrid-name and add the prefix "lookup_". (This is Case-Sensitive!!)
2. set the ID to your view-ID (like i described in previous posts)
function setMarketingLookupFilter(){ var lookup = Xrm.Page.getControl("lookup_Marketinglists"); if(lookup) { var id = "{7D7737D8-1A05-4ABB-BEBD-843404A83DAD}"; var defaultView = lookup.getDefaultView(); if(defaultView != id) { lookup.setDefaultView(id); } } setTimeout( function(){ setMarketingLookupFilter(); } , 500); }
(Please remove the line-numbers of the script ;) )
best regardsTobias
Hi Tobias,
Always "lookup" value is coming null, its not finding the value of lookup, and the same i can get using getElementById function which not supported way. Plz let me know.
sharing my temp organization could you please do here the same i need. its my request.
Online Ogr URL: punesoft.crm5.dynamics.com/main.aspx;page=Settings&area=nav_administration#736986542
UserName: m.sharique@punesoft.onmicrosoft.com
Password: *******
remove your credentials!!!!! i will try it. but don't post credentials!
in your environment there is no marketing list-subgrid on contact-form.
i will add one to let you see how it works.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2