Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Cloning Email with Power FX but having trouble setting Status Reason

(0) ShareShare
ReportReport
Posted on by
Hi all, I am trying to clone an received email.
 
I can get the record created with the Subject and body and by default it creates an outgoing email, so I'm trying to update the status but it's not working with what I have below. I can run a real time workflow on create to set the correct status' and that works but I feel it must be possible with Power FX or is it not possible?
 
Thanks in advance for any help.
 
Paul
 
Patch('Email Messages', Defaults('Email Messages'), {Subject: Self.Selected.Item.Subject & " - Clone -", Description: Self.Selected.Item.Description, Direction: Self.Selected.Item.Direction = 'Direction (Email Messages)'.Incomingstatecode : 'Activity Status (Email Messages)'.Completed, statuscode : 'Status Reason (Email Messages)'.Received});
 
 
EDIT: think the above might be an older way of referencing status', I've also tried it like this:
 
Patch('Email Messages', Defaults('Email Messages'), {Subject: Self.Selected.Item.Subject & " - Clone -", Description: Self.Selected.Item.Description, 'Activity Status': 'Activity Status (Email Messages)'.Completed, 'Status Reason': 'Status Reason (Email Messages)'.Received});
 
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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,392 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans