Script Include choices

Rajesh Annepak1
Kilo Guru

Hello All,

var dept_list = [];

  var str;

  var bu = new GlideRecord('u_salesforce_access');

  bu.addQuery('u_division',div);

  bu.query();

  while (bu.next()){

  uniqueMembers.push(bu.u_bu.toString());

  }

  var arrayUtil = new ArrayUtil();

  dept_list = arrayUtil.unique(uniqueMembers);

i have the dept_list values correct and displaying in   log as

find_real_file.png

I need to return these choices to the client script GlideAjax and from the client script i need to populate each option as a dropdown for select box data type in our catalog item

Could you please help me with the code to return these choices to client script and make it populate for a drop down field

Rajesh

1 ACCEPTED SOLUTION

Midhun1
Giga Guru

Hi rajesh,



Use   toString() while pushing to array it works.


View solution in original post

11 REPLIES 11

Midhun1
Giga Guru

Hi rajesh,



Use   toString() while pushing to array it works.


Hi Midhun



I didnt work for me , It gives me the same error



find_real_file.png



Can you try it once and let me know if that works for you


how to remove this error org.mozilla.javascript error is coming in the drop down list

Midhun1
Giga Guru

Hi Rajesh,



Please paste the code will fix it.


Thanks Midhun



It worked for me