Dear all,
I have problem with plugin as subject.
I have entity test_contract which have field "Parent Contract", when plugin create new contract from currentContract, after that test_ParentContract will lookup to currentContract(old contract).
But I can't set value for that field.
Below my code:
var currentContract = serviceContext.test_contractSet.FirstOrDefault(x => x.Id == contract.Id);
Entity newContract = new Entity("test_contract");
{
......some fields;
newContract["test_ParentContract"] = new EntityReference("test_contract", new Guid(currentContract.Id.ToString()));
service.Create(newContract);
}
Please help to resolve this case.
Thanks,
SonDang
*This post is locked for comments