Dear Community,
I am struggeling with the issue that my custom JavaScript on the "email" form (OnLoad) is not available in the new UI. However everything is fine when I look at the form using the old interface.
My script is pretty simple, in order to test this behaviour I just created a JavaScript webresoure named mp_test.js with the following lines of code:
var Sdk = window.Sdk || {}; (function () { // Code to run in the form OnLoad event this.formOnLoad = function (executionContext) { alert("Hello");} }).call(Sdk);
On the form I added the script to the library and defined the function that should be called on the OnLoad event: Sdk.formOnLoad handing over the ExecutionContext and activating it.
Once I open the form in the old interface, the alert message is showing. However, nothing happens in the new UI. I can't even find the script in the developer tools when using the new UI, meaning that it hasn't even been loaded.
Does anyone has experienced similar issues? I did test the script on another entity as well, with the exact same results.
I would appreciate any comments regarding this matter.
Thank you very much and best regards,
Philipp
I Followed the Microsoft document.and sorted issue my own.
Hi Philip,
I am also facing same issue.On Form load script is not working.any workaround you found for this?
Thanks,
Rajesh
Hi,
Did you try new browser/ incognito mode? As you can't find the file, I doubt its a caching issue.
Hope this helps.
Hi Phillip,
As per documentation it's should work in new UI.
Are you getting any error? If yes please share.
Please have a look below reference -
docs.microsoft.com/.../walkthrough-write-your-first-client-script
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