web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

UCI - executionContext undefined in page load event handler

(0) ShareShare
ReportReport
Posted on by 505

I'm passing the execution context as a first parameter to my form load event handler.

Here is my code:

function checkSender(executionContext) {

    var formContext = executionContext.getFormContext(); // get formContext
}

When the page loads, I get executionContext is undefined error.

How can I fix this?

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: UCI - executionContext undefined in page load event handler

    Hello,

    Did you ticked the checkbox "Pass Execution Context as a First Parameter" in registration of onload event?

  • Priyank Bhavsar Profile Picture
    505 on at
    RE: UCI - executionContext undefined in page load event handler

    Yes, I ticked that checkbox.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: UCI - executionContext undefined in page load event handler

    What's the version of your CRM and can I see the event registration screenshot?

  • Priyank Bhavsar Profile Picture
    505 on at
    RE: UCI - executionContext undefined in page load event handler

    CRM version is 9.1

    See the screenshot below:

    pastedimage1581434626701v1.png

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: UCI - executionContext undefined in page load event handler

    Everything looks correct for me.

    I would highly recommend to troubleshoot your issue using developer tools:

  • Verified answer
    Priyank Bhavsar Profile Picture
    505 on at
    RE: UCI - executionContext undefined in page load event handler

    Thanks Andrew.  The issue was that the form for which I ticked that checkbox is different from the default form which is loaded at first.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: UCI - executionContext undefined in page load event handler

    I'm glad that you found and fixed your issue.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 235

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 177

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans