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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Execution context have undefined _eventArgs attribute in UCI

(0) ShareShare
ReportReport
Posted on by 25

I'm having an issue on getEventArgs() of the execution context object. I've passed the execution context as first parameter on the field event

2627.pastedimage1608017462512v3.png

However, I am encountering this error once it fired:

8713.pastedimage1608017365398v2.png

When I debug the script, I observed that the execution context has 'undefined' _eventArgs attribute:

5707.pastedimage1608017562361v4.png

This is working on previous version but when we transitioned to UCI, this issue occurs.

I have the same question (0)
  • Suggested answer
    Miguel Lourenco Profile Picture
    Microsoft Employee on at

    Hi,

    have you tried:

    function preventAutoSave(executionContext) {
        var eventArgs = executionContext.getEventArgs();
        if (eventArgs.getSaveMode() == 70 || eventArgs.getSaveMode() == 2) {
            eventArgs.preventDefault();
        }
    }

    as stated in https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/save-event-arguments/getsavemode 

    In your scenario without the prevendefault.

  • Nicco Profile Picture
    25 on at

    Hi Miguel, yes that is part of my code:

    5488.pastedimage1608025337698v2.png

    I'm wondering if in UCI the getEventArgs() is moved to other object or the way it should be retrieved has changed.

  • Verified answer
    Nicco Profile Picture
    25 on at

    I've raised a support ticket on Microsoft and they confirmed that this is an issue on UCI upgrade. It was fixed with their weekly patch updates.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 109

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 63 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans