【问题标题】:Add to List Dialog in Dynamics CRMDynamics CRM 中的“添加到列表”对话框
【发布时间】:2011-04-03 21:59:57
【问题描述】:

我在 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? */ );

但是当我尝试使用一个简单的 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. 

我做错了什么?

谢谢。

【问题讨论】:

    标签: .net dynamics-crm dynamics-crm-4


    【解决方案1】:

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

    网址格式为:

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

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

    【讨论】:

      猜你喜欢
      • 2013-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多