0

下面是我用来获取帐户记录值的代码。这在 ie 中运行良好,但是当我在 Outlook 2010 中调用相同时,它给出错误。

var guid = Xrm.Page.getAttribute('new_guid').getValue();

我已经在字段中存储了帐户记录的 guid new_guid

http://server:port/organisation/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + guid + "')

我无法上传错误快照,因为我是新用户。错误说,

OData Select Failed: http://server:port/organisation/XRMServices/2011/OrganizationData.svc/AccountSet(guid'{34970124-8C34-E211-9279-005056C00008}')

4

1 回答 1

1

我得到了我的问题的解决方案。我需要使用

Xrm.Page.context.getServerUrl()+"/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + guid.replace("{","").replace("}","") + "')";

我对服务器 url 进行了硬编码,这在 Outlook 中不起作用,但在 ie 中运行良好。

于 2012-11-26T12:23:04.613 回答