Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

Plugin to get updated fields value, its previous value, its schema name and its display name.

Posted on by 10

Hi, I am creating a plugin which sends email on updated of fields. And in the mail I have to attach all the updated fields value, its previous value, its schema name and its display name. I am not getting any solution how to get updated field values in the plugin.

Thanks in advance

  • Suggested answer
    XM-22040801-0 Profile Picture
    XM-22040801-0 11 on at
    RE: Plugin to get updated fields value, its previous value, its schema name and its display name.

    Hi,

    In a plugin the Target will contains all modified attributes. You can get the list via the Attributes property.
    Example:

    Entity entity = (Entity)context.InputParameters["Target"];
    string modifiedFields = string.Join(", ", entity.Attributes.Select(attr => $"{attr.Key} => {attr.Value}"));

    To get the previous value, you can use a PreImage. See carldesouza.com/.../

  • Suggested answer
    ankit_singhal Profile Picture
    ankit_singhal 560 on at
    RE: Plugin to get updated fields value, its previous value, its schema name and its display name.

    You need to regiaster plugin on post operation and email sent should be the last step. Then it will populate updated value else you can use power automate to send email using email template as well.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans