Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
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,962 Moderator 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

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…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans