Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Plugin to see if there is a matching record before create

Posted on by 1,017

Hello,

Whenever a Contact record is created, we are creating XYZ entity record through plugin.Now, before actually creating the XYZ  record, I would like to do a check to see if there is any matching record that is already present in the system based on some values. If a matching record is found I would like to stop the create of the record. Please advise the plugin code and best way to handle this. Thanks.

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Plugin to see if there is a matching record before create

    Hi,

    You can use fetchXml to check for an existing record.

    carldesouza.com/.../

    Check if count >0 throw an error/Do not create xyz record

    You can register your plugin on post operation

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans