Dynamics CRM 中的“添加到列表”对话框

发布于 2024-10-30 00:52:25 字数 1139 浏览 1 评论 0原文

我在 Dynamics 中有一个自定义表单,我想将一些联系人添加到列表中。我想为此使用内置的添加到列表表单:

_grid/cmds/dlg_addtolist.aspx

我希望能够执行类似的操作

window.showModalDialog("/" + organizationName + "/_grid/cmds/dlg_addtolist.aspx?  
iObjType=2&iTotal=" + iTotal + "&itemObjectId=" + itemObjectId + "&itemObjectTypeCode=" + itemObjectTypeCode,  
/* put the ids in here...but in what format? */ );

但是当我尝试使用 ids 的简单 json 数组作为 showModalDialog 调用的参数时,Dynamics 抛出以下错误(在事件查看器中)(在弹出表单并单击“确定”继续之后):

Exception information: 
    Exception type: ArgumentOutOfRangeException 
    Exception message: Expected 'Guid' data type for 'iId' parameter in 'Request.QueryString'.  The raw request was 'POST /Dynamics/_grid/cmds/dlg_addtolist.aspx?iObjType=2&iTotal=1&iIndex=0&itemObjectId=35b5B78B84B-675C-E011-AACF-00155D1FB10935d&itemObjectTypeCode=4300&iId=889169' called from http://crm.dev.com:8515/Dynamics/_grid/cmds/dlg_addtolist.aspx?iObjType=2&iTotal=2&itemObjectId={5B78B84B-675C-E011-AACF-00155D1FB109}&itemObjectTypeCode=4300. 

我做错了什么?

谢谢。

I have a customized form in Dynamics that I want to add some contacts to a list. I'd like to use the built in add to list form for this:

_grid/cmds/dlg_addtolist.aspx

I'd like to be able to do something like this

window.showModalDialog("/" + organizationName + "/_grid/cmds/dlg_addtolist.aspx?  
iObjType=2&iTotal=" + iTotal + "&itemObjectId=" + itemObjectId + "&itemObjectTypeCode=" + itemObjectTypeCode,  
/* put the ids in here...but in what format? */ );

But when I try this using a simple json array of the ids as the argument for showModalDialog call, Dynamics throws the following error (in the Event Viewer) (after the form pops up and I click ok to continue):

Exception information: 
    Exception type: ArgumentOutOfRangeException 
    Exception message: Expected 'Guid' data type for 'iId' parameter in 'Request.QueryString'.  The raw request was 'POST /Dynamics/_grid/cmds/dlg_addtolist.aspx?iObjType=2&iTotal=1&iIndex=0&itemObjectId=35b5B78B84B-675C-E011-AACF-00155D1FB10935d&itemObjectTypeCode=4300&iId=889169' called from http://crm.dev.com:8515/Dynamics/_grid/cmds/dlg_addtolist.aspx?iObjType=2&iTotal=2&itemObjectId={5B78B84B-675C-E011-AACF-00155D1FB109}&itemObjectTypeCode=4300. 

What am I doing wrong?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只想待在家 2024-11-06 00:52:25

使用 Fiddler,我能够看到当项目被添加到营销列表时,它是作为 POST 请求而不是 GET 请求完成的。

URL 格式为:

/{organizationName}/_grid/cmds/dlg_addtolist.aspx?iObjType={entityTypeCodeOfItemToBeAdded}
&iTotal=1&iIndex=2&itemObjectId={guidOfTheList}&itemObjectTypeCode=4300
&iId={guidOfTheItemToBeAdded}

要添加到列表中的每个项目都创建了一个单独的 POST。

Using Fiddler, I was able to see that when items are being added to a Marketing List, it's done as a POST, not a GET request.

The URL format was:

/{organizationName}/_grid/cmds/dlg_addtolist.aspx?iObjType={entityTypeCodeOfItemToBeAdded}
&iTotal=1&iIndex=2&itemObjectId={guidOfTheList}&itemObjectTypeCode=4300
&iId={guidOfTheItemToBeAdded}

Each item to be added to the list had a separate POST created.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文