Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Populating Polymorphic lookups with PowerFX

(1) ShareShare
ReportReport
Posted on by 10
Hi all, I have a button on the command bar to create a copy of an email record but am having trouble setting the polymorphic lookups.
 
The From/Sender will always be a Contact and the ToRecipients will always be a Team, Owner will also be a Team so I thought that I'd just be able to cast the type but I can't seem to get it to work.
 
Any help much appreciated.
 
Navigate(
        Patch(
            'Email Messages',
            Defaults('Email Messages'),
            {
                Subject: "[Copied Email] " & Self.Selected.Item.Subject,
                Description: Self.Selected.Item.Description,
                Sender: AsType(Self.Selected.Item.Sender, Contacts)
            }
        )
    );
 
Thanks in advance
 
Paul
Categories:

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans