Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans