Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Execution context have undefined _eventArgs attribute in UCI

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans