locked
CRM 2011 - Plugin on 'Phone Call' entity on 'Create' message is not getting triggered when 'Phone Call' records are created through 'Quick Campaign' RRS feed

  • Question

  • Hi there,

    I've a plugin created on 'Create' message on 'Phone Call' entity which runs absolutely fine (and updated 2 custom fields on the current record) when phone call records are created manually. However, if I create a phone call records through 'Quick Campaign' on lead entity, it's creating 'Phone Call' records but the 2 custom fields are not getting updated (which is a job of a plugin). Any idea what's getting wrong?

    Thanks,
    Abhi

    Monday, November 19, 2012 2:33 PM

Answers

  • Hi,

    Got the root cause of the problem.

    Here is the explanation:

    The plugin was registered on the 'Pre-Operation' and in the code, I was checking the depth of the context object. So, plugin was returning when the depth > 1 and since I was creating the phone call records through quick campaign, the plugin code was returning at the beginning due to "context.depth". Commented the depth code and the plugin is executing properly and the 2 custom fields are now getting updated as expected.

    Thanks,
    Abhi

    • Marked as answer by abhidoiphode Tuesday, November 20, 2012 1:04 PM
    Tuesday, November 20, 2012 1:03 PM

All replies

  • Hi Abhi,

    Can you please share your code for better understanding .


    Warm Regards,

    Suresh Kumar D


    Tuesday, November 20, 2012 4:32 AM
  • Hi,

    Got the root cause of the problem.

    Here is the explanation:

    The plugin was registered on the 'Pre-Operation' and in the code, I was checking the depth of the context object. So, plugin was returning when the depth > 1 and since I was creating the phone call records through quick campaign, the plugin code was returning at the beginning due to "context.depth". Commented the depth code and the plugin is executing properly and the 2 custom fields are now getting updated as expected.

    Thanks,
    Abhi

    • Marked as answer by abhidoiphode Tuesday, November 20, 2012 1:04 PM
    Tuesday, November 20, 2012 1:03 PM
  • how did you register it?  primary?  Secondary?
    Thursday, April 11, 2013 6:03 PM