Qualifying lead does not fire the account create plugin? RRS feed

  • Question

  • Hi Everyone,

    I have a plugin which programmatically creates an account and a contact from an existing lead utilizing the QualifyLeadRequest. I also use a custom numbering plugin for a set of entities including account, it is firing for create in the prevalidation stage.

    My problem is the following.

    - my post-operation plugin fires on lead update as expected, and an account and a contact is created

    - the created account does not receive a generated number, it seems the create step for account did not fire

    Do you think it is possible that the account create step does not fire at all when qualifying a lead into an account? If it is the case, what is the best approach to update the account with the number? Could the account get retrieved just after the QualifyLeadResponse arrives?



    Tuesday, February 24, 2015 1:00 PM


  • For compound operations like QualifyLead, the pre-validation step only applies to the compound operation (in this case QualifyLead). However, the pre-operation step applies to each component operation (in this case Create of the Account and Contact). So, the simplest solution is to register your numbering plugin on the pre-operation stage, rather than pre-validation

    See http://www.mscrmuk.blogspot.co.uk/2014/06/plugin-pre-stages-some-subtleties.html for a bit more info

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by Adam Borsik Thursday, February 26, 2015 9:30 AM
    Tuesday, February 24, 2015 2:57 PM