Created
February 3, 2017 10:03
-
-
Save synesthesia/9a2a32eefc534d03a4b09c8f00097536 to your computer and use it in GitHub Desktop.
Workarounds for CRM set state weirdness - C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var invoiceEntity = new Entity(Invoice.EntityLogicalName) { Id = invoiceRef.Id }; | |
invoiceEntity["statecode"] = new OptionSetValue((int)InvoiceState.Active); | |
invoiceEntity["statuscode"] = new OptionSetValue((int)invoice_statuscode.ReadyToIssue); | |
tracingService.Trace("Update invoice status to Ready To Issue, Id:{0}", invoiceEntity.Id); | |
service.Update(invoiceEntity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment