locked
Plugin runs successfully, yet CRM 4.0 blows in my face RRS feed

  • Question

  • I posted this somewhere else as well.. but I figured I might create a new thread as well..

    So here's the issue:

    I observed a message like this one

     Web Service Plug-in failed in OrganizationId: <guid>; SdkMessageProcessingStepId: <guid>; ; EntityName: lead; Stage: 50; MessageName: Create; AssemblyName: AutoNumber.clsAutoNumber, AutoNumber, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxx; ClassName: AutoNumber.clsAutoNumber; Exception: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
       at AutoNumber.clsAutoNumber.Execute(IPluginExecutionContext context) in E:\CRM\LeadAutoNumber\AutoNumber\clsAutoNumber.cs:line 66
       at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)

     in the Event Viewer, only that it's for a contractdetail, update message. The thing is this: although my plugin is correctly set, I get an error after it runs.. that full of information error saying "An error has occured. Try again.. " etc..

    I debug my code successfully and there are no errors in it. It's just that, after the code from plugin runs, the crm blows that error in my face. I have no idea what is its problem..

    I would really appreciate some help on this, as I'm clueless..

    Thank you,
    Florin
    Thursday, May 8, 2008 4:18 PM

Answers

  • Thank you for your help, guys. It seems I was trying to update a CrmMoney field with a CrmDecimal value.. I guess it can't get any better than 'An error occured'.. I miss the old 'type mismatch'? Stick out tongue
    Friday, May 16, 2008 1:09 PM

All replies

  • The actual error message is Object reference not set to an instance of an object. Basically, you are trying to an object which has not been instantiated yet.

     

    The error occurred in the line 66 of AutoNumber.clsAutoNumber.Execute function.

     

    - Henri

     

    Friday, May 9, 2008 5:51 AM
  • well.. that is not the content of my actual event viewer message, but something similar to that. The thing is that I cleared the event viewer to be sure that I get that error when my plugin runs, and, although CRM still shows that 'An error has occurred', there are no messages related to it in the event viewer anymore. That's why I borrowed that message from some other poster.

    There are no errors in the code of my plugin..

    Thanks for reply,
    Florin
    Friday, May 9, 2008 6:08 AM
  • what bout you post the entire actual error message?

     

    Friday, May 9, 2008 6:25 AM
  • have you registered it.

     

    Also give me more details as this is working example.

     

    Regards,

    Imran

     

     

    Monday, May 12, 2008 1:44 PM
    Moderator
  • Thank you for your help, guys. It seems I was trying to update a CrmMoney field with a CrmDecimal value.. I guess it can't get any better than 'An error occured'.. I miss the old 'type mismatch'? Stick out tongue
    Friday, May 16, 2008 1:09 PM