web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Prevent Plugin to trigger on Pre-Operation

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to trigger a plugin on pre-operation only on specific conditions based on my code.

Is there any way to do that ?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    It's not possible. You will have to include that logic into your plugin code and just exit from execution if condition is not met.

  • Community Member Profile Picture
    on at

    I agree. But its a webservice request. Based on that I need to trigger.

  • Suggested answer
    Ivan Ficko Profile Picture
    1,380 on at

    Calling a web service inside plugin code just to check condition will be quite tricky if you call it on a frequently used action like RetrieveMultiple.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    I'm sorry but you have no other way.

  • Community Member Profile Picture
    on at

    Ok. But How can i capture webservice request values in the plugin on creation?

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    I'm sorry but I'm not sure what kind of issues you experience.

    What's the difference when to call webservice - during create, update or delete?

  • Community Member Profile Picture
    on at

    Actually In the webservice I am trying to create or update based on the given Request. So on create -

    I have a plugin trigger on Pre operation which will generate unique Id.

    So for some conditions on the request. I want to prevent the plugin to create Unique Id.

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Where are you calling your web service from? The plugin?

    Can you please provide more detail of what exactly you are trying to do? It seems like there are some missing pieces to the puzzle here. Also, plugins execute on particular events (such as Create, Update, Delete) as you mentioned previously, what event are you performing before the plugin executes, and what does the plugin have to do exactly?

    Thanks...

  • ashlega Profile Picture
    34,477 on at

    If you have a web service that's calling CRM, and you have a plugin in CRM that you only want to kick in under some conditions.. Maybe create a special field in your entity and populate that field from the service to indicate (for the plugin)if it should do anything or not.

  • Community Member Profile Picture
    on at

    Hi, I am developing an REST api, I will get input Request, based on that I will create/update entity in CRM. So Before creating i need to trigger plugin (on Pre-Operation) to create UniqueID. So now I have to prevent that plugin to trigger based on the input request.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans