タイプ所有者の属性を入力するためのJavaの同等のコードを知っている人はいますか?
Owner owner = new Owner();
owner.type = EntityName.systemuser.ToString();
owner.Value = user.UserId;
所有者へのentityreferenceを使用して、空のGuidの問題を解決しました。しかし今私は打っています:
[ERROR] Invalid ownerIdType = 7
これは、上記のC#の2行目であるowneridtype属性に関連していると思いますが、現在のコードは次のとおりです。
OrganizationServiceStub.KeyValuePairOfstringanyType owneridtype = new OrganizationServiceStub.KeyValuePairOfstringanyType();
owneridtype.setKey("owneridtype");
OrganizationServiceStub.OptionSetValue owner2 = new OrganizationServiceStub.OptionSetValue();
owner2.setValue(Integer.parseInt("8"));
owneridtype.setValue(owner2);
collection.addKeyValuePairOfstringanyType(owneridtype);
OrganizationServiceStub.KeyValuePairOfstringanyType vendedor = new OrganizationServiceStub.KeyValuePairOfstringanyType();
vendedor.setKey("ownerid");
OrganizationServiceStub.Guid vendedorGuid = utils.readVendCrm(serviceStub,args[17]);
OrganizationServiceStub.EntityReference owner = new OrganizationServiceStub.EntityReference();
owner.setLogicalName("owner");
owner.setId(vendedorGuid);
vendedor.setValue(owner);
collection.addKeyValuePairOfstringanyType(vendedor);