locked
GetServerConfiguration Object Reference not set RRS feed

  • Question

  • I have written a plugin to update a an entity when another entity is updated. The code I am using was first tested in a desktop application for syntax and such.

    When I put it u=into my plugin code I get an error in the plugin execution.

    Dim serviceProxy As OrganizationServiceProxy

    Dim serverConnect As New Microsoft.Crm.Sdk.Samples.ServerConnection()

    Dim config As Microsoft.Crm.Sdk.Samples.ServerConnection.Configuration = serverConnect.GetServerConfiguration()

    I get the error on the last line. Is my methodology correct in getting the server configuration. Thanks for any help.

    Friday, August 9, 2013 7:56 PM

Answers

  • Hi,

    In Plugin you don’t need to get the server configuration.

    Please refer the below MSDN blog for this.

    http://msdn.microsoft.com/en-us/library/gg594416.aspx

    Plug-ins are custom classes that implement the IPlugin interface. You can write a plug-in in any .NET Framework 4 CLR-compliant language such as Microsoft Visual C# and Microsoft Visual Basic .NET. To be able to compile plug-in code, you must add Microsoft.Xrm.Sdk.dll and Microsoft.Crm.Sdk.Proxy.dll assembly references
    to your project. These assemblies can be found in the SDK\Bin folder of the SDK download.

    Please let me know iof you need any further help!

    Thanks!



    • Edited by Kalim Khan Saturday, August 10, 2013 5:43 AM
    • Marked as answer by bbuchanan Monday, August 12, 2013 9:28 PM
    Saturday, August 10, 2013 5:42 AM

All replies

  • Hi,

    In Plugin you don’t need to get the server configuration.

    Please refer the below MSDN blog for this.

    http://msdn.microsoft.com/en-us/library/gg594416.aspx

    Plug-ins are custom classes that implement the IPlugin interface. You can write a plug-in in any .NET Framework 4 CLR-compliant language such as Microsoft Visual C# and Microsoft Visual Basic .NET. To be able to compile plug-in code, you must add Microsoft.Xrm.Sdk.dll and Microsoft.Crm.Sdk.Proxy.dll assembly references
    to your project. These assemblies can be found in the SDK\Bin folder of the SDK download.

    Please let me know iof you need any further help!

    Thanks!



    • Edited by Kalim Khan Saturday, August 10, 2013 5:43 AM
    • Marked as answer by bbuchanan Monday, August 12, 2013 9:28 PM
    Saturday, August 10, 2013 5:42 AM
  • Thanks I had figured that out but the confirmation that I was right is good.

    Monday, August 12, 2013 9:27 PM