Dynamics CRM 中的“添加到列表”对话框
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Fiddler,我能够看到当项目被添加到营销列表时,它是作为 POST 请求而不是 GET 请求完成的。
URL 格式为:
要添加到列表中的每个项目都创建了一个单独的 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:
Each item to be added to the list had a separate POST created.