从java在microsoft CRM上设置类型owner的属性
有人知道Java中填写类型所有者属性的等效代码吗从java在microsoft CRM上设置类型owner的属性,java,web-services,crm,Java,Web Services,Crm,有人知道Java中填写类型所有者属性的等效代码吗 Owner owner = new Owner(); owner.type = EntityName.systemuser.ToString(); owner.Value = user.UserId; 我使用了对所有者的entityreference,并解决了Guid为空的问题。但现在我要说的是: [ERROR] Invalid ownerIdType = 7 我认为这与owneridtype属性有关,在上面的C#是第二行,m当前代码如下:
Owner owner = new Owner();
owner.type = EntityName.systemuser.ToString();
owner.Value = user.UserId;
我使用了对所有者的entityreference,并解决了Guid为空的问题。但现在我要说的是:
[ERROR] Invalid ownerIdType = 7
我认为这与owneridtype属性有关,在上面的C#是第二行,m当前代码如下:
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);
恐怕我对Java和CRM 2011了解不多,但这篇文章可能有用 其他相关问题:
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("systemuser");
owner.setId(vendedorGuid);
vendedor.setValue(owner);
collection.addKeyValuePairOfstringanyType(vendedor);
Java,它是一个使用soap web服务的外部应用程序,而不是CRMThx内部的解决方案,它是我遵循的第一个文档,用于启动接口的开发。这很好,因为它有助于连接和使用Web服务。它缺少从wsdl2java生成的所有类的详细信息,这就是我在将C#示例代码转换为JAVA时遇到的问题。