locked
CRM 2011 Plugin Error RRS feed

  • Question

  • Hi,

    We have a plugin which fires on 'Update' of a CONTRACT. This plugin checks for few attributes (which are used in calculating price) are modified. If they are modified, then a new CONTRACT LINE is created with new price.

    This plugin fails while creating a new CONTRACT LINE. The reason we are assumming is that whenever PRICE in contract line is updated, the CRM updates the related CONTRACT. So the plugin fires again and this probably is going into infinite loop.

    We also verified this by using -- 'context.depth == 1' parameter, but was not successful.

    **Also we tried removing 'Price' related fields of CONTRACT from 'Filtering Attributes' in the plugin registration tool, so that this plugin DOES NOT FIRE when price is updated but with no luck.

    Could any one please suggest me with the right direction/procedure in achieving this?


    Chandana Koppula
    Tuesday, December 27, 2011 5:23 AM

Answers

  • can you get the depth to be printed each time it enters along with date time. This will let you confirm it is entering the plugin more than once.

    Also print all the context properties apart from depth. This will help you identify the check to be applied to skip subsequent calls of the plugin.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Friday, January 13, 2012 12:56 AM

All replies

  • First we need to confirm if this is the infinite loop detection or something else.. What is the error you are seeing. In case of synchronous plugin, this can be found in the errordetails.txt file that gets downloaded when you click "Download Log File" button. For Async plugin, the system job's message field should show the error.

    If it is the infinite loop problem, there might be other fields still in Filtering Attributes that may get update on the contract when the plugin tries to create a contract line. You may need to find what these are and then exclude from from filtering attributes list, if it makes sense.

    Thanks,

    Uma Maheswari Anbazhagan [MSFT]

     

    Thursday, January 12, 2012 11:12 PM
  • can you get the depth to be printed each time it enters along with date time. This will let you confirm it is entering the plugin more than once.

    Also print all the context properties apart from depth. This will help you identify the check to be applied to skip subsequent calls of the plugin.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Friday, January 13, 2012 12:56 AM