Hi Ankur,

Thanks for your reply. But I am unable to get that message displayed by using gs.addInfoMessage when I put it in UI Action.  Below is my List choice UI action. I even tried g_form.addInfoMessage but not getting it. Please guide me where I need to add it here.

 

function conasset() {
var en = g_list.getChecked().split(",");
if (!en || en.length == 0)
return;

var back = function() {
var ga = new GlideAjax('comSentAJAX');
ga.addParam('sysparm_name', 'ajaxcom');
ga.addParam('sysparm_id', en.join(','));

var Close = function() {
reloadWindow(window);
};

ga.getXMLAnswer(Close.bind(this));
return true;
};

var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
var dialog = new dialogClass('glide_confirm_standard');
dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
dialog.setPreference('warning', true);
dialog.setPreference('title', " Send mail?");
dialog.setPreference('onPromptComplete', back.bind(this));
dialog.render();
}

gs.addinfomesaage and gs.adderrormessage belongs to glisesystem API which is server side API 

how we are using it for UI actions or client scripts or UI Policies 

I'm a rookie RN, please lemme know 

Ajaykumar1
Tera Guru

Hi Muktha,

Use g_form.addInfoMessage("your message here"); in your UI Action.

Regards,
Ajay

muktha1
Tera Guru

Hi all,

Thanks for your replies. But I am unable to get that message displayed by using gs.addInfoMessage when I put it in UI Action.  Below is my List choice UI action. I even tried g_form.addInfoMessage but not getting it. Please guide me where I need to add it here.

 

function conasset() {
var en = g_list.getChecked().split(",");
if (!en || en.length == 0)
return;

var back = function() {
var ga = new GlideAjax('comSentAJAX');
ga.addParam('sysparm_name', 'ajaxcom');
ga.addParam('sysparm_id', en.join(','));

var Close = function() {
reloadWindow(window);
};

ga.getXMLAnswer(Close.bind(this));
return true;
};

var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
var dialog = new dialogClass('glide_confirm_standard');
dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
dialog.setPreference('warning', true);
dialog.setPreference('title', " Send mail?");
dialog.setPreference('onPromptComplete', back.bind(this));
dialog.render();
}

can you try adding before and after reloadwindow statement and check if its working. if it does, try removing each one and see which works.