locked
Plugin on phonecall assign (for cascading behaviour). RRS feed

  • Question

  • Hello! I needed to write a plugin which will change some fields of the phonecall on reassign. Registered such plugin on Assign and Route messages (Post-update, synchronous) of phonecall entity, it works when directly reassigning phonecall. However, plugin doesn't fire when cascading re-assign occurs (for example when I change owner of the related opportunity). In CRM 4.0 this was solved by registering in Child pipeline, unfortunately there's no such option in 2011.

    Similar topic is here http://social.microsoft.com/Forums/sk/crmdevelopment/thread/c8f9829c-eb20-4ef9-9a42-267bfe364e18 with no result.

    Is there any way to trigger my logic on cascade reassign? 

    Wednesday, November 14, 2012 12:56 PM

Answers

  • Hi,

    Rather than register on the Assign Message - register on the Update Message - and check if the ownerid attribute has changed. Where there is a cascade assign, the Assign Message isn't used.

    Scott


    Scott Durow
    Read my blog: www.develop1.net/public     Follow Me on Twitter
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, November 14, 2012 1:22 PM
    Answerer

All replies

  • Hi,

    are you checking for the context depth in your plugin and breaking execution if the Depth is greater than 1? If this is the case then it could be that the Depth is greater than 1 when reassigning in cascade. This is my suspection at least.

    Greetings,

    Pavlos


    Please mark this reply as an answer and vote it as helpful if it helps you find a resolution to your problem.
    View my latest gallery contribution here.
    Visit my blog here.

    Wednesday, November 14, 2012 1:03 PM
  • Hi,

    Rather than register on the Assign Message - register on the Update Message - and check if the ownerid attribute has changed. Where there is a cascade assign, the Assign Message isn't used.

    Scott


    Scott Durow
    Read my blog: www.develop1.net/public     Follow Me on Twitter
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, November 14, 2012 1:22 PM
    Answerer
  • Thank you, that worked.
    Thursday, November 15, 2012 8:43 AM