我正在使用以下代码创建约会" 500内部服务器错误"
我添加了所有字段检查
Appointment objappointment = Appointment.build()
.setSubject("Android sub")
.setDescription("dis from device")
.setRegardingObjectId(new EntityReference("account", UUID.fromString("0717b8e2-d00a-e611-8115-c4346bdd11d1")))
.setOwnerId(new EntityReference("systemuser", UUID.fromString("3edb272d-2da7-4c89-9350-2f4bd4e1762b")))
.setStateCode(new OptionSetValue(0))
.setNew_Latitude(23.7845)
.setNew_Longitude(73.6574)
.setNew_City("Surat")
.setActualStart(mDate.getTime())
.setActualEnd(mDate1.getTime())
.setNew_ZipPostalCode("380060")
.setNew_Street1("Street1")
.setNew_Street2("Street3")
.setNew_street3("Street3")
.setNew_StateProvince("Gujarayt")
.setNew_CountryRegion("India")
.setNew_Latitude(23.7845)
.setNew_Longitude(73.6574)
.setStatusCode(new OptionSetValue(0))
.setPriorityCode(new OptionSetValue(2));
try {
RestOrganizationServiceProxy restService = new RestOrganizationServiceProxy(mOrgService);
restService.Create(objappointment,new Callback<UUID>() {
@Override
public void success(UUID uuid, Response response) {
log("sucess", uuid.toString());
}
@Override
public void failure(RetrofitError error) {
displayError(error.toString());
log("error", error.toString());
}
});
}
catch(Exception ex) {
displayError(ex.getMessage());
log("msg",ex.toString());
}
另一个实体使用上面的代码成功创建只是在&#34; Appoinment&#34;
答案 0 :(得分:0)
您能获得有关异常的更多详细信息吗? 500可以是任何例外。至少你知道请求命中服务器并且它在CRM服务器端失败了。也许一个插件或类似的东西正在引发异常。
我认为你必须传递注释将链接到的objectid(帐户,联系人或其他......)
是内部部署还是在线CRM?如果是OnPremise,你可以在web.config中启用includeExceptionDetailInFaults属性,以至少获得异常的更多细节....