how to add Info Message to List Action Assignment in Workspace

Alon Grod
Tera Expert

Hi,

This is my List Action Assignment, the functionality is working find but im trying add g_from.addInfoMessage('hi') but nothing is happening.
How can I add info message so it will be visible to the user in List view.

AlonGrod_0-1767264772403.png

function onClick() {

    var checkedRecords = g_list.getChecked();
	//gs.addInfoMessage('hi');
	//g_form.addInfoMessage('tttt');
    var ga = new GlideAjax('WmTaskBatchPdfExporter');
    ga.addParam('sysparm_name', 'isPdf'); // Setting input
    ga.addParam('sysparm_sys', checkedRecords);

    ga.getXML(ajaxCallback);
}

function ajaxCallback(response) {
    var answer = response.responseXML.documentElement.getAttribute("answer");
    if (answer) {
		
		top.location.href = answer;
       
    }
}

 

13 REPLIES 13

Mohammed8
Giga Sage

Hi @Alon Grod 

g_form.addInfoMessage not available for list view on custom workspaces

 

Here are some links which might help you

https://www.servicenow.com/community/next-experience-forum/how-to-add-info-or-error-message-in-a-wor...

https://www.servicenow.com/community/next-experience-articles/why-addinfomessage-adderrormessage-don...

 

Thanks and Regards,

Mohammed Zakir

adityahubli
Tera Guru

Hello @Alon Grod ,

g_form.addInfoMessage() is work only on form not on list view . You can simply use alert() on list view .

 

If this helps you then mark it as helpful and accept as solution.

Regards,

Aditya,

Technical Consultant

@adityahubli 

Would you mind sharing if that worked for you in workspace list action?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello @Ankur Bawiskar ,

Yes its working on my pdi. I attach some screenshot you can refer that.

 

Screenshot (1160).pngScreenshot (1161).pngScreenshot (1162).png