Created
February 3, 2017 10:05
-
-
Save synesthesia/1adf51acf4d111d27b3da1d54ba298c8 to your computer and use it in GitHub Desktop.
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 }; | |
// do not attempt to set the statecode - if you do this code will fire workflows twice | |
// 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