dynamics crm 2011 - CRM2011 Unable to retrieve Lookup Filter selected Values in Javascript -


here scenario:

  1. i have added ribbon button on contact form. on clicking, loads modal dialog shown below:

enter image description here

  1. when click on custom lookup icon button on modal dialog, launch lookup filter window using code below:
function openlookup() {      var objectcode = "2";      var url = serverurl+"/_controls/lookup/lookupinfo.aspx? allowfilteroff=1&defaulttype=1&defaultviewid={a9af0ab8-861d-4cfa-92a5- c6281fed7fab}&disablequickfind=0&disableviewpicker=0&lookupstyle=single&shownewbutton=1&show propbutton=1&browse=false&currentobjecttype=2&currentid={7d2d14ae-7ee1-e311-b136- 00155d02101e}&objecttypes=1%2c2";      var lookup = window.open(url, null,  "width=500,resizable=1,height=400,menubar=0,status=1,location=0,toolbar=0,scrollbars=1",  null);     if (lookup != null) {         var selectedval = lookup.items[0].name;      } } 

when parse resultant object lookup, not have variable items. unable retrieve selected values in lookup filter window.

any appreciated.

thanks.

here how it:

 var updatedaccountid;  var updatedaccountname = "";  var lookup = window.showmodaldialog(url, "entity", "dialogwidth: 450; dialogheight: 300; resizable: yes");           var updated = json.parse(lookup);  (i = 0; < updated.items.length; i++) {     if (updated.items[0].id != null)       {             updatedaccountid = updated.items[0].id;             }     if (updated.items[0].name != null)      {            updatedaccountname = updated.items[0].name;               }     } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -