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

Notifications

Announcements

No record found.

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
    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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 49 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans