Archive

Category Archives for "Common Data Service"

NO ADMIN REQUIRED: Launch your canvas PowerApp from a Dynamics 365 Record

My latest canvas PowerApps creation provides a streamlined interface for managing “technical close plan” records in Dynamics 365 (set of configured entities associated with Opportunities). I built this app for myself and my peers to spend less time navigating between screens when building out our close plans so that we could have timely and accurate close plans visible to the whole pursuit team.

I estimate a time savings of a few minutes per deal per week. Over time that really adds up. Also, there’s a great peace of mind that I get personally knowing that I’m on top of it.

The only trouble is, I typically work with records inside of Dynamics, and didn’t want to have to jump out to a new browser window (or grab my phone), open the PowerApp, search for the specific record, etc.. That would chew into the time savings too much for my liking.

Why not just embed a PowerApp in the record form or add a menu button?

Unfortunately, both of those assume you have System Customizer or Administrator access to the environment. That’d be a great way to go, but I’m just a regular old user this time—and I don’t have an “in” with the admin either.

I didn’t want to recreate the saved Opportunity lists (system and personal views)…because I’m not a fan of reinventing the wheel inside of my apps, especially when I’m using the Dynamics 365 or CDS connector.

So I built my PowerApp with the assumption that I would spoon-feed in a specific Opportunity record through some other means (with some TBD level of automation).

Then I built a bookmarklet

“What’s a bookmarklet?” You know what a bookmark is in your browser: click a link and go to a website. A bookmarklet looks like the same thing, except when you click, it runs a little script to do something.

screenshot of bookmarklet in the browser window

In my case, the bookmarklet finds the record GUID based the page I have open, then opens my PowerApp in a new window and passes in that GUID as a parameter.

I couldn’t find something readymade, but I did borrow the script to get the GUID. Big thanks to Benjamin John, who published a couple of blogs with a bunch of Dynamics 365 bookmarklets.

Handling the parameter

When the PowerApp is launched, specifically when the first screen loads, I use a function to check for the parameter and store it as a global variable:

Set(gvSelectedOpp,First(Filter(Opportunities,opportunityid=Param("opty_id"))));If(gvSelectedOpp.opportunityid<>"111111bc-1111-1111-1111-000111101111",Navigate(scrOppDetails,Fade))

The second function (the If… after the “;”) checks to see if the parameter was there and the app navigates to the details screen. There are a bunch of ways to do this, so I picked one that’s overly complicated but fun to look at. Oh the joyous freedoms of being a Citizen Developer 😉

Conclusion and call for collaborators

All in all, this was a couple of hours from initial research to final product and it’s already saved me a bunch of time in accessing the right record from my PowerApp. It also made me think back to a time before I had Admin privileges in most environments I touch. That’s a fun and creative part of the problem-solving brain that I was happy to say hello to again.

If you’re interested, I released the JavaScript for the bookmarklet as a project on GitHub. I recognize that it’s using the older (but still functioning) page.xrm object which is not ideal moving forward. I’m open to help from a real developer who can help update it to leverage the Web API equivalent.

XRM Toolbox with Dynamics 365 and Model Driven PowerApps

To anyone building model-drive PowerApps, Dynamics 365 for Customer Engagement, or the Common Data Service for Apps, XRM Toolbox needs to be your friend. In a recent Implement This podcast episode I discussed a couple of favorite tools in the toolbox.

Specifically we talk about:

View the full show notes (and the video I mention) at implementthis.org

Cascade Rules in the Common Data Service for Apps

Recently Britta and I recorded and released a podcast episode about “cascade rules” behavior. When building relationships between entities in the Common Data Service, these settings influence the behavior of visibility, assignment, and other system capabilities.

This capability can be leveraged when building model-driven PowerApps and extending Dynamics 365 Customer Engagement.

View the full episode show notes at implementthis.org