cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WimKrings
Frequent Visitor

Report the previous and new value of a Dynamics 365 Account field to a user

Hello,

 

We have the business need that we have to make an email when specific fields of an account are modified and the email must contain only the values of the fields that are changed and the value before and after change. The fields are changed in the background by an integration with an external application, which we can't alter.

 

As solution I thougt of making a Power Automate flow that would be triggered by any of those fields changing and that would get the values and create the email. The only problem is that in Power Automate I can't  get the values before the change was made. A kind of pre-image behaviour that we could use in a plug-in scenario. But I'm not a coding expert so I rather would go for a none coding solution. 

I came up with the next idea:

Create a synchronous workflow (the non Power Automate version of workflows ;-)), that will be triggered by  change of the same field but on the 'before update' action. And let this workflow save the 'old' values in a custom field 'oldvalueofxxx'. 

In the Power Automate flow I now will be able to get the old and new value and compare if it is changed and report it in the email.

 

But I still have thougts about this solution if it is really what I want.. it feels a bit 'non-elegant' and I'm asking myself if I'm overlooking possible issues. 

In pro's and con's that I see:

Pro's:

- easy to make

- standard no-code functionallity

- processlogs for failures and easy retry possibillities

 

Con's:

- not elegant.... 

- additional storage needed

- ??

 

What do you think about this solution and has anyone another ideau of solving this?

(I have found another solution which uses Azure servicebus but that's a nogo area for us at the moment)

 

 

2 REPLIES 2
marshallthomson
New Member

I have the same business need - did you find a solution for this?

abm
Super User
Super User

Hi @WimKrings  & @marshallthomson 

 

Using Power Automate you can't get the pre-image values. Power Automate trigger runs after the commit operation so its not possible to get the values.

 

Couple of options

 

1. Duplicate the same entity and when ever the record is created or changed you can refer to other entity. Like you mentioned this is also not an elegant solution.

 

2. Plugin (Pre-Image) operation. Here you need custom code (c# .net) to implement this.

 

3. API access via custom code or Power Automate HTTP Action step.

How to get the audit log of an entity in CRM 2016 using a web API - Microsoft Dynamics CRM Forum Com...

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,680)