this question 줄을 따라다이나믹 CRM 2011에 지불 된 송장으로 표시
Silverlight를 사용하여 Dynamics CRM 2011에서 기존 송장을 유료로 표시하려고합니다. 나는이 작업을 수행 할 때
는 documentation에 따르면, 내가해야 할 일은 내가 "NOTFOUND"예외가 상태 코드 = 100001와 국가 코드 = 2
설정됩니다.
Guid invoiceID = new Guid("Existing Invoice Guid");
IOrganizationService orgService = OrgServiceFactory.GetInstance();
orgService.BeginRetrieve("invoice", invoiceID, new ColumnSet(new string[] { "invoiceid", "statecode", "statuscode" }), (result) =>
{
var fetchResp = orgService.EndRetrieve(result);
var statecodeAttrib = fetchResp.Attributes.Single(a => a.Key == "statecode");
OptionSetValue statecode = (OptionSetValue)statecodeAttrib.Value;
statecode.Value = 2;
var statuscodeAttrib = fetchResp.Attributes.Single(a => a.Key == "statuscode");
OptionSetValue statuscode = (OptionSetValue)statuscodeAttrib.Value;
statuscode.Value = 100001;
orgService.BeginUpdate(fetchResp, (updateResult) =>
{
/* Web Exception thrown here */
orgService.EndUpdate(updateResult);
Console.Write("");
}, orgService);
}, orgService);
나는 "statecode"비트를 제거하고 단지 시도하고 2로 상태 코드를 설정 한 경우 - 예상대로 작동 (청구) - (일부 배송) 4.
시도하고 설정하는 경우에만 실패합니다. 상태 코드 = 100001, 100002, 100003 (완료, 부분, 취소됨)을 설정하려고해도 실패합니다.
인보이스를 유료로 표시하는 다른 방법이 있습니까?
상태 코드를 2 또는 3으로 설정할 수 있지만 다른 것은 설정할 수 없습니다. –
상태 코드를 업데이트 만 사용하면 동일한 상태의 다른 상태로 변경할 수 있지만 상태를 변경하면 실제로 SetState 메시지를 보내야합니다. – Matt