나는 정말로 내가 여기에서 꼼짝 못하는 것처럼 somone이 나를 더 도울 수 있기를 바란다. 임 게시물 크리 에이 티브 플러그인에서 내 계약 엔티티에 계약 라인을 추가하려고. 내 코드 : 나는 오류가 몇 가지 이유를 들어계약 CRM 2011에 계약 라인 추가
Guid c_Id = (Guid)entity.Attributes["contractid"];
DateTime start = (DateTime)entity["activeon"];
DateTime end = (DateTime)entity["expireson"];
Money money = new Money();
money.Value = 0;
//Set Instance for Contract Line
Entity ContractLine = new Entity();
ContractLine.LogicalName = "contractdetail";
//Create Contract Line for the Contract
ContractLine["title"] = "PLUGIN FIRED";
ContractLine["activeon"] = start;
ContractLine["expireson"] = end;
ContractLine["totalallotments"] = 1;
//ContractLine["customerid"] = entity["customerid"];
//ContractLine["productid"] = entity["productid"];
ContractLine["price"] = money;
ContractLine["contractid"] = c_Id;
service.Create(ContractLine);
그 "속성 : contractid은 NULL로 설정할 수 없습니다"나는 다른 필드를 checkd, 그것은 실제로 contractid의 GUID를 얻을 수 없기 때문에 정말 stragnge 다른 엔티티. 나는 somone가 나를 여기에서 도울 수 있는지 정말로 정말로 바르게 평가할 것이다. 감사.
대단히 고마워요 분, 감사합니다. ContractLine [ "contractid"] = 새로운 EntityReference ("contract", c_Id)로 변경해야했습니다. –