Notifications
Announcements
No record found.
Here's a strange one... running getDefaultView on lookup controls (Xrm.Page.getControl("my_lookupid").getDefaultView()) returns... an empty string. This seems to be for all lookup controls, regardless of the form.
Is this some known bug in version 8.2.9.19?
Hi,
There is no bug and this single line of code works very nicely and even i am using MSCRM 2013 and the same code is working fine for us.So this feature is working from the previous version and the existing features will not break in the newer version.
Code
// add the default View GUID for the view id
var viewId = Xrm.Page.getControl(“new_projecttemplateitemid”).getDefaultView();
This single piece of line works like a charm.
Hope this helps.
Regards,
Thangamani
Well, the line you wrote is identical to my line (sans control name, but that's expected).
I WAS, eventually, able to get the ID via getElementById() and then getAttribute("defaultviewid").
We have the same case. Also Xrm.Page.data returns null. It's a create form opened from a related entities grid. Anyone knows the cause?
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.
Tom_Gioielli 108 Super User 2025 Season 2
Jimmy Passeti 50 Most Valuable Professional
Gerardo Rentería Ga... 49 Most Valuable Professional