locked
CRm workflow and plug-in issue RRS feed

  • Question

  • On one entity I've a Workflow which updates certain fields and then on the same entity I've a Plug-in now what is happening Once my plug-in fires it causes to fire the workflow and when workflow updates my Plug-in is fired again. so Is there any way to solve this issue.
    KV

    Monday, February 22, 2010 7:27 AM

Answers

  • you have to check CallerOrigin in Context object. Check this link
     
    http://nishantrana.wordpress.com/2009/01/16/callerorigin-property-of-plugin-context/

    Represents the base class used to determine the origin of the call to the Web service.

    The CallerOrigin class exposes the following members.
    Static Property Description
    Application Gets the caller origin for the application.
    AsyncService Gets the caller origin for the asynchronous service.
    WebServiceApi Gets the caller origin for the Web services.
    http://malikhan.wordpress.com/
    Monday, February 22, 2010 7:54 AM

All replies

  • you have to check CallerOrigin in Context object. Check this link
     
    http://nishantrana.wordpress.com/2009/01/16/callerorigin-property-of-plugin-context/

    Represents the base class used to determine the origin of the call to the Web service.

    The CallerOrigin class exposes the following members.
    Static Property Description
    Application Gets the caller origin for the application.
    AsyncService Gets the caller origin for the asynchronous service.
    WebServiceApi Gets the caller origin for the Web services.
    http://malikhan.wordpress.com/
    Monday, February 22, 2010 7:54 AM
  • Hi Khan,

    another question, If there are two plug ins on same entity is there anyone to find out which one causing the Update? 

    KV
    Monday, February 22, 2010 8:21 AM
  • Hmmm, i am not sure you can do this. May be you can have a picklist  with new_pluginUpdates with two value A(for plugin a) and B (for plugin b). now update this value to A & B in the respective plugins.

    if the value of the picklist is A, it is mean its updated from A.
    if the value of the piclist is B, it mean its updated from B.

    now which attribute is set you can determine which plugin did the attribute.


    http://malikhan.wordpress.com/
    Monday, February 22, 2010 8:52 AM
  • Hi, i use to write logs in the plugins to test it. You can try that ;)
    Friday, March 5, 2010 9:16 AM