locked
crm 2011 convert order to invoice and change the state using OrganizationServiceClient RRS feed

  • Question

  • I am using /XRMServices/2011/Organization.svc to get the service from the crm 2011. I can create a new order using OrganizationServiceClient. But i want to convert that order to invoice and change the status of the invoice to completed or cancelled. I couldn't find a way to do this using OrganizationServiceClient. I found a class ConvertSalesOrderToInvoiceResponse crm.sdk.message But I can't use it in the organization services. How can i proceed? 

    Thanks in advance.

    Wednesday, August 31, 2011 9:53 AM

Answers


  • I followed the method used in crm 2011 sdk rather than using OrganizationServiceClient webservice and it worked.
    • Marked as answer by jeyan Thursday, January 26, 2012 7:39 AM
    • Edited by jeyan Thursday, January 26, 2012 7:40 AM
    Thursday, January 26, 2012 7:39 AM

All replies

  • using ConvertSalesOrderToInvoiceRequest message, the sample code is at "ConvertSalesOrderToInvoiceRequest Members" chapter  in sdk
    daemon lin
    • Proposed as answer by HIMBAPModerator Wednesday, August 31, 2011 11:00 AM
    Wednesday, August 31, 2011 10:25 AM
  • Hi,

    you need to creat ConvertSalesOrderToInvoiceRequest object and need to use execute method for this.


    Mahain : MS CRM Freelancer
    Wednesday, August 31, 2011 11:02 AM
    Moderator
  • Hi daemonlin and Mahender,

    If i use Microsoft.Crm.Sdk.Messages namespace to create ConvertSalesOrderToInvoiceRequest object,

    i can't use it in the OrganizationServiceClient.execute method. Error says best overloaded method match for Service.OrganizationServiceClient.execute(Service.OrganizationalRequest)

     has some invalid argument .

    Does that mean I can't use OrganizationServiceClient for ConvertSalesOrderToInvoiceRequest? Then how can i go for it?

    P.S. I am new to CRM sdk

    Thanks.




    Wednesday, August 31, 2011 1:24 PM

  • I followed the method used in crm 2011 sdk rather than using OrganizationServiceClient webservice and it worked.
    • Marked as answer by jeyan Thursday, January 26, 2012 7:39 AM
    • Edited by jeyan Thursday, January 26, 2012 7:40 AM
    Thursday, January 26, 2012 7:39 AM