Good afternoon!
I started studying development for dynamics a short time ago and I faced a challenge: I would like that, by clicking on a customized button, an opportunity page would be opened (that is, an html when clicking on the button). On this page there will be a lookup for opportunities and I need to get the return (that is, the chosen record). How could I start doing this?
Hello,
That answers a lot. This namespace was introduced as a part of 9.0 release. Check following post that should help you with 8.2 - www.inogic.com/.../
Version 1612 (8.2.14.10)
What version of CE do you use?
Yes, I am doing it just this way.
Ok. Now the next question - in what way did you insert the code into onload of the opportunity page? Can you confirm you did it in this way - reenhanced.com/.../
I use a translator, so I apologize for the translation errors. I understand that I am confused for those who are reading. I'll try again: I inserted this code in the onload of the opportunity page, without being linked to a button, just to test if it opened the dialog.
However, the error I mentioned above has occurred.
Can you please explain in detail what do you mean with "I inserted the following code snippet into the page's onload"
I inserted the following code snippet into the page's onload:
let lookupOptions = {
defaultEntityType: "account",
entityType: ["account"],
allowMutiSelect: False,
};
Xrm.Utility.lookupObjects (lookupOptions) .then(alert ("sucess")).fail(alert("fail"));
When loading the page, the following error is displayed: "TypeError: Xrm.Utility.lookupObjects is not a function at Object.onload."
Any idea what might be going on?
Andre, thank you very much for the reply. I will try to do what you suggested and I will return here soon.
Hello,
I can be wrong but there is no need in HTML to be opened. You can use Xrm.Utility.lookupObjects to open the lookup dialog, provide the value and return the result to the calling side - docs.microsoft.com/.../lookupobjects
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156