The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Better Together T-shirt Design Contest
We're starting a “Better Together” T-shirt design contest. The theme is "Powerful alone. Better together," and we want to see your best T-shirt designs that encompass all 5 products in the family: Microsoft Dynamics 365, Power BI, Power Apps, Power Automate, and Power Virtual Agents. | Read More about T-Shirt Design Contest
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
For the most part, Entity Lists try to mirror the functionality of the selected model-driven form in CDS. This means that certain settings on the model-driven form can have a significant impact on how things work in Power Apps Portals, event if it is not obvious at first. In this post, I’ll cover one of those not-so-obvious (at least to me) settings – Show Related Records.
A little while back someone was asking on the D365UG forums about customizing the popup that appears when editing Portal Comments via the Timeline control. Unfortunately, the modal popup to edit comments is hard-coded when using the Timeline control, so the customization options are limited. One suggested work around is to used a standard subgrid, which provides a few more options (but doesn’t display in quite the same way as the Timeline control).
Whenever you do anything with activities (Portal Comments are a custom activity type), things can get weird, so before suggesting a subgrid, I wanted to try it out. I was able to quickly add a subgrid, and configured the ability to create new records using Entity Form Metadata. Entity Form Metadata allows you to add a create button to your subgrid, which can popup an Entity Form in a modal popup. Since now we’re dealing with Entity Forms, we can configure the form for creating Portal Comments. Great!
The problem I ran into is that after I created the record, it didn’t appear in my subgrid. I checked in CDS and found that while the record was created, it wasn’t related to my original record (in my situation, a Case record). What gives?
After a lot (too much, probably) of poking around through the Xrm Portal Community Edition code, I was finally able to track down the issue: I hadn’t selected the Show related records option when configuring my subgrid on the model-driven form.
Without that selected, the code doesn’t pass the type and ID of the current Case record to the popup (which is actually hosted in an iframe, and the type and ID are passed via the query string). Without having those details the form doesn’t know which record to associate to and so it is created without that association, leading to an odd user experience where the record is created but doesn’t appear in the list from which it was created.
So, if you want the new record to be automatically associated with the current record, be sure to select the Show related records option on your subgrid configuration!
The post Power Apps Portals: New Related Record is Unrelated? appeared first on Engineered Code.
Business Applications communities