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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / JS Destructuring and I...
Power Apps
Unanswered

JS Destructuring and Inconsistent casing.

(0) ShareShare
ReportReport
Posted on by 203

I found that context (PowerApps) and Xrm (unified) objects have issues when it comes to destructuring.

 

const { openForm } = Xrm.Navigation; (This works with legacy ui)

const { openForm } = context.navigation;

 

Both of these will result in error when openForm is executed. I am guessing that the openForm is not permanently bound to its context object.

 

Also, casing of "navigation" is inconsistent between the 2 objects. They should be the same.

 

I have the same question (0)
  • v-yutliu-msft Profile Picture
    on at

    Hi @rexkenley ,

    Firstly, the question that you asked is more about Dynamics.I suggest you post  your issue in Dynamics forum. It will help you solve your problem faster.

    This table shows the most commonly used function in the Dynamics CRM Xrm.Utility class, and the method calls in Dynamics 365 v9.

    Dynamics CRM Client API Dynamics 365 v9 Client API
    Xrm.Utility.openEntityForm Xrm.Navigation.openForm
    Xrm.Utility.openQuickCreate Xrm.Navigation.openForm 
    Xrm.Utility.openWebResource Xrm.Navigation.openWebResource
    Xrm.Utility.alertDialog Xrm.Navigation.openAlertDialog
    Xrm.Utility.confirmDialog Xrm.Navigation.openConfirmDialog

    So please make sure that where do you use this function.

    If you are using Dynamics CRM Client API, please try this function:  Xrm.Utility.openEntityForm.

    Here's a doc about it for your reference:

    https://www.briteglobal.com/blogs/community/migrate-client-api-to-dynamics-365-ce-i/

     

     

     

    Best regards,

  • rexkenley Profile Picture
    203 on at

    Phoebe

     

    This is not only happening in dynamics, this is ALSO happening in PowerApps Component Framework. And if I am not mistaken, isn't Dynamics CE also PowerApps as announced by Charles Lamanna?

     

    "With the announcement that the Dynamics v9 UI is a PowerApp and development will be shifting to a PowerApp design experience, this brings enormous implications to not only the Dynamics 365 CE platform but everything else. No, you heard me correctly. Dynamics 365 is a PowerApp. Charles Lamanna (Business Application Platform Director at Microsoft) gave the keynote talk at Denver Dynamics Day last week."

    https://dynamicsmechanics.com/dynamics-365-development-why-powerapps-is-the-new-power-stone-in-the-microsoft-dynamics-universe-mdu/#.XbA1GZpKiUn


    Destructuring is a JS feature introduced with ES6. Destructuring works with v9 legacy and is only BROKEN with v9 Unified (which is PowerApps) and PowerApps Component Framework.

    "The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables."
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment



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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 402

#2
WarrenBelz Profile Picture

WarrenBelz 380 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 293 Super User 2025 Season 2

Last 30 days Overall leaderboard