Microsoft Dynamics CRM4.0 JScript 过滤lookup 出现 Microsoft Dynamics CRM 窗口无法打开,可能已被弹出窗口阻止程序所阻止。
Posted on 2013-10-09 17:13 Hamilton Tan 阅读(1961) 评论(0) 编辑 收藏 举报一、现象:JScript过滤lookup字段,选择lookup字段出现下图的情况:
出现:Microsoft Dynamics CRM 窗口无法打开,可能已被弹出窗口阻止程序所阻止。请将这台Microsoft Dynamics CRM服务器添加到您的弹出窗口阻止程序允许打开新窗口的站点的列表中:192.168.1.1。
主要js代码如下:
1 var xmlProcurementPlan = "search=<fetch version=\"1.0\" output-format=\"xml-platform\" mapping=\"logical\" distinct=\"false\">" + 2 "<entity name=\"new_product_fourth\">" + 3 "<filter>" + 4 "<condition attribute=\"statecode\" operator=\"eq\" value=\"0\" />" + 5 "<condition attribute=\"new_product_fourthid\" operator=\"in\">" + 6 "<value>{0DF8B365-7216-4267-8612-FCD626D00DA1}</value>" + 7 "<value>{7BEC6ECA-A6EA-48AA-9BE9-FB68BF24ADF7}</value>" + 8 "<value>{EAE2DE1B-6F70-4CD4-9C3E-F9F53A77D065}</value>" + 9 "<value>{8F49BFE8-3AA1-4920-A5FC-F5B641C03F17}</value>" + 10 "<value>{A1914AFB-2B50-4C7B-9494-F575C4911CBC}</value>" + 11 "<value>{DB73075C-C483-482C-9818-F3DFA53FE6FA}</value>" + 12 "<value>{44186B75-A599-4D58-8A1A-F2348E1F9AAF}</value>" + 13 "<value>{64560B0C-11F8-4C6A-BF00-F09DCABD74C4}</value>" + 14 "<value>{9065295B-6C1E-4709-9583-EF8C84CB7F6A}</value>" + 15 "<value>{51250FCD-DDDA-493B-A52F-EF5A7111AF28}</value>" + 16 "<value>{5CC7E221-E2DA-45F7-B00D-EF529D49F493}</value>" + 17 "<value>{347DAE7A-4561-42A9-8238-ECF3E86C49E7}</value>" + 18 "<value>{ED06867E-92A1-40F5-B985-EB2FABA9B733}</value>" + 19 "<value>{DABD504F-FCD6-4490-8E89-E8D0AD1CB5BA}</value>" + 20 "<value>{F5DBD3A7-F17A-4515-AE13-E87FEBAF9660}</value>" + 21 "<value>{A985BFE3-F2D9-492D-9E6A-E684E2C5E564}</value>" + 22 "<value>{9726FB9F-00B0-422F-9685-E5C4CC75A39D}</value>" + 23 "<value>{DC746163-1027-4B40-BAD8-E540ED5A28EE}</value>" + 24 "<value>{F115719E-1B72-4F07-B598-E4E49134C10E}</value>" + 25 "<value>{7563F296-8937-4E27-AA6B-E14CC77866B4}</value>" + 26 "<value>{AD3497B1-BA5E-40DC-B7F5-DF9ABB375AE7}</value>" + 27 "<value>{1DB4BE3C-B35D-4D73-AF9C-DF134DD8B31D}</value>" + 28 "<value>{45D3D4C2-F05F-4D02-A86F-DEB3147B15A3}</value>" + 29 "<value>{63C44E59-29BE-4DC1-8A9D-DE4D37719D51}</value>" + 30 "<value>{E20DA6D2-92CA-4FA9-B4E4-DDABC833901B}</value>" + 31 "<value>{265D5102-FA9B-4EBE-95AB-DD4CA7D3956F}</value>" + 32 "<value>{FD2E5896-AC72-4EA5-B394-DD03C7F5331D}</value>" + 33 "<value>{523E017C-B2D5-4947-B0EF-DC7DC5134E55}</value>" + 34 "<value>{CFB1896B-5D8B-4887-8D01-DAC996B2A948}</value>" + 35 "<value>{72CE01F2-4985-447F-B9F0-DA56284F8C68}</value>" + 36 "<value>{FD921C2A-8535-4615-B50D-D900B94039E6}</value>" + 37 "<value>{49C6466C-C581-4467-8730-D8E03579027B}</value>" + 38 "<value>{FD188EBA-1D55-4ED5-B711-D8BA43FAAB2A}</value>" + 39 "<value>{C8B39B78-FAE8-4EC9-BB2C-D7EC0EB3A83E}</value>" + 40 "<value>{D72B7669-103A-47F0-B342-D6DAEAB5C676}</value>" + 41 "<value>{2E0A7486-A725-4147-87D8-D6932927EE0A}</value>" + 42 "<value>{740381FF-9B71-47F9-AFBB-D54A1BA18DCE}</value>" + 43 "<value>{42B9ABA3-D244-4C8E-B417-D4BFB7AFA207}</value>" + 44 "<value>{BC5D2E94-7883-4543-83D8-D38C83ED48A7}</value>" + 45 "<value>{EE406D7E-B506-4C1D-947E-D259BE99FFC8}</value>" + 46 "<value>{BCF96075-4DB5-42B2-9E3E-D15C21E55703}</value>" + 47 "<value>{DA681D67-4350-425F-9A8B-D09541412099}</value>" + 48 "<value>{A6B1AF79-E003-4738-B2F2-D091CC4DEC47}</value>" + 49 "<value>{D84B69AA-71F4-47A8-B38D-D087B721F1B9}</value>" + 50 "<value>{EEEE68B5-D8F1-4BF0-8DF7-CFBE501EC6B1}</value>" + 51 "<value>{4EC57F3C-06AE-4CB6-8AD0-CF8F253D9228}</value>" + 52 "<value>{59979E97-72FF-4CF0-A177-CE8D38B71920}</value>" + 53 "<value>{4B93EDFB-ADD8-48D8-B05D-CCF81F8A8A82}</value>" + 54 "<value>{F9DEA4D6-80CA-4A15-A2EE-CC8166194F38}</value>" + 55 "<value>{9CFF1E31-1FAC-43C1-B537-CBD98A58FDBF}</value>" + 56 "<value>{E6A0E8CA-A6CF-4C18-8216-CAF998716149}</value>" + 57 "<value>{E45813D1-6FC2-4664-A27E-CA957F235F7B}</value>" + 58 "<value>{98E43C76-A05B-4CF2-93D7-CA0C36C741D0}</value>" + 59 "<value>{A995D5DA-CE60-47CB-8955-C720405712AA}</value>" + 60 "<value>{DCE75C9B-58E7-4B97-BDFD-C60C91910873}</value>" + 61 "<value>{8A3E38CB-A4AA-4D36-887C-C57537D67A80}</value>" + 62 "<value>{B6BA695A-A1DB-45CF-8CD5-C5638F41E74F}</value>" + 63 "<value>{3571AEA5-3581-43B2-AFE5-C526991B7AC4}</value>" + 64 "<value>{4445A38D-7B0E-4120-9948-C331DE4C7641}</value>" + 65 "<value>{2BFF3FEE-FF72-448F-922E-C2B2187F4F16}</value>" + 66 "<value>{C3B0CEAE-637D-45AF-8F74-C1DD09B5D908}</value>" + 67 "<value>{FA60EAEF-4015-410B-A8C1-C153E9FA04F9}</value>" + 68 "<value>{9342CA27-3F97-4595-B2F2-C104726B6F6B}</value>" + 69 "<value>{0E79E270-5A79-4496-AD7A-C0242EDC3EE3}</value>" + 70 "<value>{2091AFCB-14AD-4DAE-B514-BF8AB1531166}</value>" + 71 "<value>{74B2C88D-E527-4910-89A8-BCECC34CBDC2}</value>" + 72 "</condition>" + 73 "</filter>" + 74 "</entity>" + 75 "</fetch>"; 76 crmForm.all.new_product_fourthid.additionalparams = xmlProcurementPlan;
经过打开表单的窗体,按F12,在控制台调试,发现,CRM 4.0 in 后面的条件超过65个以上(不包括65个)就会出现这个,问题,然后去掉71后面的
"<value>{74B2C88D-E527-4910-89A8-BCECC34CBDC2}</value>" +
重新修改的JS代码如下:
1 var xmlProcurementPlan = "search=<fetch version=\"1.0\" output-format=\"xml-platform\" mapping=\"logical\" distinct=\"false\">" + 2 "<entity name=\"new_product_fourth\">" + 3 "<filter>" + 4 "<condition attribute=\"statecode\" operator=\"eq\" value=\"0\" />" + 5 "<condition attribute=\"new_product_fourthid\" operator=\"in\">" + 6 "<value>{0DF8B365-7216-4267-8612-FCD626D00DA1}</value>" + 7 "<value>{7BEC6ECA-A6EA-48AA-9BE9-FB68BF24ADF7}</value>" + 8 "<value>{EAE2DE1B-6F70-4CD4-9C3E-F9F53A77D065}</value>" + 9 "<value>{8F49BFE8-3AA1-4920-A5FC-F5B641C03F17}</value>" + 10 "<value>{A1914AFB-2B50-4C7B-9494-F575C4911CBC}</value>" + 11 "<value>{DB73075C-C483-482C-9818-F3DFA53FE6FA}</value>" + 12 "<value>{44186B75-A599-4D58-8A1A-F2348E1F9AAF}</value>" + 13 "<value>{64560B0C-11F8-4C6A-BF00-F09DCABD74C4}</value>" + 14 "<value>{9065295B-6C1E-4709-9583-EF8C84CB7F6A}</value>" + 15 "<value>{51250FCD-DDDA-493B-A52F-EF5A7111AF28}</value>" + 16 "<value>{5CC7E221-E2DA-45F7-B00D-EF529D49F493}</value>" + 17 "<value>{347DAE7A-4561-42A9-8238-ECF3E86C49E7}</value>" + 18 "<value>{ED06867E-92A1-40F5-B985-EB2FABA9B733}</value>" + 19 "<value>{DABD504F-FCD6-4490-8E89-E8D0AD1CB5BA}</value>" + 20 "<value>{F5DBD3A7-F17A-4515-AE13-E87FEBAF9660}</value>" + 21 "<value>{A985BFE3-F2D9-492D-9E6A-E684E2C5E564}</value>" + 22 "<value>{9726FB9F-00B0-422F-9685-E5C4CC75A39D}</value>" + 23 "<value>{DC746163-1027-4B40-BAD8-E540ED5A28EE}</value>" + 24 "<value>{F115719E-1B72-4F07-B598-E4E49134C10E}</value>" + 25 "<value>{7563F296-8937-4E27-AA6B-E14CC77866B4}</value>" + 26 "<value>{AD3497B1-BA5E-40DC-B7F5-DF9ABB375AE7}</value>" + 27 "<value>{1DB4BE3C-B35D-4D73-AF9C-DF134DD8B31D}</value>" + 28 "<value>{45D3D4C2-F05F-4D02-A86F-DEB3147B15A3}</value>" + 29 "<value>{63C44E59-29BE-4DC1-8A9D-DE4D37719D51}</value>" + 30 "<value>{E20DA6D2-92CA-4FA9-B4E4-DDABC833901B}</value>" + 31 "<value>{265D5102-FA9B-4EBE-95AB-DD4CA7D3956F}</value>" + 32 "<value>{FD2E5896-AC72-4EA5-B394-DD03C7F5331D}</value>" + 33 "<value>{523E017C-B2D5-4947-B0EF-DC7DC5134E55}</value>" + 34 "<value>{CFB1896B-5D8B-4887-8D01-DAC996B2A948}</value>" + 35 "<value>{72CE01F2-4985-447F-B9F0-DA56284F8C68}</value>" + 36 "<value>{FD921C2A-8535-4615-B50D-D900B94039E6}</value>" + 37 "<value>{49C6466C-C581-4467-8730-D8E03579027B}</value>" + 38 "<value>{FD188EBA-1D55-4ED5-B711-D8BA43FAAB2A}</value>" + 39 "<value>{C8B39B78-FAE8-4EC9-BB2C-D7EC0EB3A83E}</value>" + 40 "<value>{D72B7669-103A-47F0-B342-D6DAEAB5C676}</value>" + 41 "<value>{2E0A7486-A725-4147-87D8-D6932927EE0A}</value>" + 42 "<value>{740381FF-9B71-47F9-AFBB-D54A1BA18DCE}</value>" + 43 "<value>{42B9ABA3-D244-4C8E-B417-D4BFB7AFA207}</value>" + 44 "<value>{BC5D2E94-7883-4543-83D8-D38C83ED48A7}</value>" + 45 "<value>{EE406D7E-B506-4C1D-947E-D259BE99FFC8}</value>" + 46 "<value>{BCF96075-4DB5-42B2-9E3E-D15C21E55703}</value>" + 47 "<value>{DA681D67-4350-425F-9A8B-D09541412099}</value>" + 48 "<value>{A6B1AF79-E003-4738-B2F2-D091CC4DEC47}</value>" + 49 "<value>{D84B69AA-71F4-47A8-B38D-D087B721F1B9}</value>" + 50 "<value>{EEEE68B5-D8F1-4BF0-8DF7-CFBE501EC6B1}</value>" + 51 "<value>{4EC57F3C-06AE-4CB6-8AD0-CF8F253D9228}</value>" + 52 "<value>{59979E97-72FF-4CF0-A177-CE8D38B71920}</value>" + 53 "<value>{4B93EDFB-ADD8-48D8-B05D-CCF81F8A8A82}</value>" + 54 "<value>{F9DEA4D6-80CA-4A15-A2EE-CC8166194F38}</value>" + 55 "<value>{9CFF1E31-1FAC-43C1-B537-CBD98A58FDBF}</value>" + 56 "<value>{E6A0E8CA-A6CF-4C18-8216-CAF998716149}</value>" + 57 "<value>{E45813D1-6FC2-4664-A27E-CA957F235F7B}</value>" + 58 "<value>{98E43C76-A05B-4CF2-93D7-CA0C36C741D0}</value>" + 59 "<value>{A995D5DA-CE60-47CB-8955-C720405712AA}</value>" + 60 "<value>{DCE75C9B-58E7-4B97-BDFD-C60C91910873}</value>" + 61 "<value>{8A3E38CB-A4AA-4D36-887C-C57537D67A80}</value>" + 62 "<value>{B6BA695A-A1DB-45CF-8CD5-C5638F41E74F}</value>" + 63 "<value>{3571AEA5-3581-43B2-AFE5-C526991B7AC4}</value>" + 64 "<value>{4445A38D-7B0E-4120-9948-C331DE4C7641}</value>" + 65 "<value>{2BFF3FEE-FF72-448F-922E-C2B2187F4F16}</value>" + 66 "<value>{C3B0CEAE-637D-45AF-8F74-C1DD09B5D908}</value>" + 67 "<value>{FA60EAEF-4015-410B-A8C1-C153E9FA04F9}</value>" + 68 "<value>{9342CA27-3F97-4595-B2F2-C104726B6F6B}</value>" + 69 "<value>{0E79E270-5A79-4496-AD7A-C0242EDC3EE3}</value>" + 70 "<value>{2091AFCB-14AD-4DAE-B514-BF8AB1531166}</value>" + 71 "</condition>" + 72 "</filter>" + 73 "</entity>" + 74 "</fetch>"; 75 crmForm.all.new_product_fourthid.additionalparams = xmlProcurementPlan;
然后重新在所在表单数据上按F12输入修改的js代码,出现:
然后这个问题就解决了。
关于这个问题的解决,大家如果觉得有问题,可以指出来,互相学习。谢谢。