locked
update Draft Contract currency RRS feed

  • Question

  • hi,

    I am trying to update all our contract currency. our organization were setup to use only canadaian currency, howevery they bill their client in many different currencies.

    I used crmservice to update the currency however the code doesn't change any contract currency ( i am trying to update only draft contract). and I don't get any error


                CrmAuthenticationToken token = new CrmAuthenticationToken();
                // You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
                token.AuthenticationType = 0;
                token.OrganizationName = orgName;

                CrmService service = new CrmService();
                service.Url = "http://servername:portnumber/mscrmservices/2007/crmservice.asmx";
                service.CrmAuthenticationTokenValue = token;
                service.Credentials = new System.Net.NetworkCredential(username, password, domainname);
     
     contract c = new contract();
    c.contractid = new Key();
      c.contractid.Value = contractid;
       c.transactioncurrencyid = new Lookup();
       c.transactioncurrencyid.Value = lcurrency.Value;
    crmservice.Update(c);

    I tried to use workflow , but I can't update currency field

    Is there a way to do it? or it is not doable?

    Thanks

    Marwa

    Wednesday, September 29, 2010 7:03 PM

Answers