Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Registering a Plugin to avoid a loop

(0) ShareShare
ReportReport
Posted on by 2

My client wishes to have a user enter information on a contact form and then use that information to add the contact to an intermediate table.

I have a created a plug-in to check if the contact being created on the contact form exists or not.

If exists, only enter information on intermediate table, if not create a new contact and enter information on intermediate table.

Issue when a contact exists, a new contact is still created.

Issue when a contact does not exist, 11 contacts get created.

Plugin is registered message: create, event pipeline stage: preoperation.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Registering a Plugin to avoid a loop

    Hello,

    There are multiple ways to avoid infinite loop and the most effective one is to check the Depth property of your plugin - if it's not 1 - that might be an infinite loop and just leave the code execution without doing that sync.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans