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.

  • Verified answer
    Nicco Profile Picture
    25 on at
    RE: Execution context have undefined _eventArgs attribute in UCI

    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.

  • Nicco Profile Picture
    25 on at
    RE: Execution context have undefined _eventArgs attribute in UCI

    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.

  • Suggested answer
    Miguel Lourenco Profile Picture
    on at
    RE: Execution context have undefined _eventArgs attribute in UCI

    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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans