针对CRM 多对多开发的的自定义页面在CRM 上调用

function CustomLookup() {
    var returnStr = window.showModalDialog("/" + ORG_UNIQUE_NAME + "/ISV/Sohugift/web/AddChildEntities.aspx?theEntity=new_appmkt", "","dialogWidth:1024px;dialogHeight:550px;scroll:no");
    if(returnStr==null||returnStr=="cancle" ){return;}
    var lookupItems=returnStr.split('|') ;
    if (lookupItems) {
    var data = new Array();
        if (lookupItems.length > 0) {
            var i = 0;
            var objs = lookupItems;
            var iLength = objs.length;
            for (i = 0; i < iLength; ++i) {
                var item = new Object();
                item.id = objs[i];
                data[i]=item;            
            }
            var CRMItems =new Object();
            CRMItems.items =data;
            AssociateObjects(crmFormSubmit.crmFormSubmitObjectType.value, crmFormSubmit.crmFormSubmitId.value, lookupEntityTypeCode, CRMItems,true, null, nnId);
        }
      
        new_sync.DataValue = new Date().toString();
        new_sync.ForceSubmit = true;
        crmForm.Save();

    }
   
}

你可能感兴趣的:(自定义)