Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:58:20+00:00 2026-06-11T05:58:20+00:00

I build a plugin that runs in account update message that makes some validation

  • 0

I build a plugin that runs in account update message that makes some validation not to duplicate the record. But if I try to disable that account or merge with another one it triggers the plugin.

How can I tell if the plugin was triggered by an activate/deactivate/merge action, or event mode like the one in CRM Dynamics 2011 Save Event Arguments Reference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:58:21+00:00Added an answer on June 11, 2026 at 5:58 am

    To add to Pete Oakey’s answer, you can actually tell your plugin to fire only when certain fields are changed at the registration phase, in addition to testing this in actual code @ runtime, by changing the “Filtering Attributes” of the plugin step. So unless your validation logic specifically needs the StateCode/StatusCode attributes to correctly process, you can filter those two attributes out, or just include the attributes your validation logic needs.

    Plugin Steps

    Original answer:

    I believe you can reference the IExecutionContext.Depth Property of the IPluginExecutionContext object.

    Every time a running plug-in or Workflow issues a message request to
    the Web services that triggers another plug-in or Workflow to execute,
    the Depth property of the execution context is increased. If the depth
    property increments to its maximum value within the configured time
    limit, the platform considers this behavior an infinite loop and
    further plug-in or Workflow execution is aborted. The maximum depth
    (8) and time limit (one hour) are configurable by the Microsoft
    Dynamics CRM administrator.

    So you can use an if statement to check if Depth > 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to build a Eclipse plugin that has to use a self written
I'm trying to build an Eclipse plugin that depends on a library which has
I'm trying to build a simple jquery plugin that can take selectors as parameters.
can anyone suggest me a plugin/tool that can perform a code formatting at build
Im try to build my plugins that sit in a seperate directory on the
When using the Groovy Jenkins plugin (not the Groovy Post Build Plugin, which is
I've update to the latest SDK(4.0.x), tools(r16) and plugin(16.0.1) for Eclipse. I notice that
I'm trying to build a jQuery plugin that allows you to drag and draw
The git plugin for hudson works well. However, the build script must update a
Theres about 20 diff ant files, that make up the build. Im not sure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.