Modify the "Please Confirm" alert

Reyneres
Mega Contributor

Hello Everybody,

I'm trying to find this window that opens when you click to export a list to excel.
I want to get the information about the limit of rows to export we set and show in this window to the client before he clicks on Mail it or Wait for it.
It is possible to do that?

find_real_file.png

1 ACCEPTED SOLUTION

Syvo
Mega Guru

Hi,

If you look at the scripts in context menus: /sys_ui_context_menu_list.do?sysparm_query=parent.nameSTARTSWITHExport

you can see that the dialog is generated using an undocumented internal class "GwtExportScheduleDialog".

 

It generates something like this:

<?xml version="1.0" encoding="UTF-8"?><xml sysparm_max="15" sysparm_name="export_schedule_dialog" sysparm_processor="RenderInfo" sysparm_value="&lt;section name=&quot;export_schedule_dialog&quot;&gt;&lt;preference name=&quot;sysparm_scope&quot; value=&quot;global&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;table&quot; value=&quot;export_schedule&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;renderer&quot; value=&quot;RenderForm&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;type&quot; value=&quot;direct&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_query&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_target&quot; value=&quot;syslog&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_export&quot; value=&quot;unload_excel_xlsx&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_view&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_rows&quot; value=&quot;88555&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_fields&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_excel_type&quot;&gt;&lt;/preference&gt;&lt;/section&gt;"><html><body><rendered_body><script eval="true" language="javascript">var pref = "";		
		if (pref == "wait") {
		    g_export_schedule_dialog.waitForIt();
		} else if (pref == "email") {
		    g_export_schedule_dialog.emailMe();
		}</script><form action="sys_confirm_excel.do" id="sys_confirm_excel.do"><input name="sysparm_query" type="HIDDEN" value=""/><input name="sysparm_target" type="HIDDEN" value="syslog"/><input id="sysparm_export" name="sysparm_export" type="HIDDEN" value="unload_excel_xlsx"/><input name="sysparm_rows" type="HIDDEN" value="88555"/><input name="sysparm_view" type="HIDDEN" value=""/><input name="sys_action" type="HIDDEN" value=""/><input id="remember_me" name="remember_me" type="HIDDEN" value=""/><input id="email_address" name="email_address" type="HIDDEN" value=""/></form><table><tr><td colspan="2">The export you requested contains 88555 rows which may take a long time to return. It is recommended that you let the system email you the results instead of waiting.</td></tr><tr><td class="label"><label for="display_address">My Address is:</label></td><td><input id="display_address" value="admin@example.com"/></td></tr><tr><td colspan="2">&amp;nbsp;</td></tr><tr><td align="center"><button class="web" id="export_mail_it" onclick="g_export_schedule_dialog.emailMe();">Mail it</button></td><td align="center"><button class="web" id="export_wait" onclick="g_export_schedule_dialog.waitForIt()">Wait for it</button></td></tr><tr><td align="center" colspan="2"><input id="display_remember_me" title="Remember my decision" type="checkbox">Remember my decision</input></td></tr></table></rendered_body></body></html></xml>

 

You could build your own dialog, as long as you keep the form action and parameters.
Or, an easier solution would be to add a first step in the context menus scripts to display the maximum number of rows in a confirm popup if the number of rows is greater.

HTH
Sylvain

View solution in original post

5 REPLIES 5

Syvo
Mega Guru

Hi,

If you look at the scripts in context menus: /sys_ui_context_menu_list.do?sysparm_query=parent.nameSTARTSWITHExport

you can see that the dialog is generated using an undocumented internal class "GwtExportScheduleDialog".

 

It generates something like this:

<?xml version="1.0" encoding="UTF-8"?><xml sysparm_max="15" sysparm_name="export_schedule_dialog" sysparm_processor="RenderInfo" sysparm_value="&lt;section name=&quot;export_schedule_dialog&quot;&gt;&lt;preference name=&quot;sysparm_scope&quot; value=&quot;global&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;table&quot; value=&quot;export_schedule&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;renderer&quot; value=&quot;RenderForm&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;type&quot; value=&quot;direct&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_query&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_target&quot; value=&quot;syslog&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_export&quot; value=&quot;unload_excel_xlsx&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_view&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_rows&quot; value=&quot;88555&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_fields&quot;&gt;&lt;/preference&gt;&lt;preference name=&quot;sysparm_excel_type&quot;&gt;&lt;/preference&gt;&lt;/section&gt;"><html><body><rendered_body><script eval="true" language="javascript">var pref = "";		
		if (pref == "wait") {
		    g_export_schedule_dialog.waitForIt();
		} else if (pref == "email") {
		    g_export_schedule_dialog.emailMe();
		}</script><form action="sys_confirm_excel.do" id="sys_confirm_excel.do"><input name="sysparm_query" type="HIDDEN" value=""/><input name="sysparm_target" type="HIDDEN" value="syslog"/><input id="sysparm_export" name="sysparm_export" type="HIDDEN" value="unload_excel_xlsx"/><input name="sysparm_rows" type="HIDDEN" value="88555"/><input name="sysparm_view" type="HIDDEN" value=""/><input name="sys_action" type="HIDDEN" value=""/><input id="remember_me" name="remember_me" type="HIDDEN" value=""/><input id="email_address" name="email_address" type="HIDDEN" value=""/></form><table><tr><td colspan="2">The export you requested contains 88555 rows which may take a long time to return. It is recommended that you let the system email you the results instead of waiting.</td></tr><tr><td class="label"><label for="display_address">My Address is:</label></td><td><input id="display_address" value="admin@example.com"/></td></tr><tr><td colspan="2">&amp;nbsp;</td></tr><tr><td align="center"><button class="web" id="export_mail_it" onclick="g_export_schedule_dialog.emailMe();">Mail it</button></td><td align="center"><button class="web" id="export_wait" onclick="g_export_schedule_dialog.waitForIt()">Wait for it</button></td></tr><tr><td align="center" colspan="2"><input id="display_remember_me" title="Remember my decision" type="checkbox">Remember my decision</input></td></tr></table></rendered_body></body></html></xml>

 

You could build your own dialog, as long as you keep the form action and parameters.
Or, an easier solution would be to add a first step in the context menus scripts to display the maximum number of rows in a confirm popup if the number of rows is greater.

HTH
Sylvain

Reyneres
Mega Contributor

Thanks Syvo! 🙂

With pleasure 🙂

Please answer your own thread when you finish your implementatio and mark your question as answered so that it can help others.

@Syvo This looks like exactly what we need but we have been unable to find the item that generates the xml you specify. The dialog is generated using an undocumented internal class "GwtExportScheduleDialog"

Can you specify exactly where I would go to edit the string output for that dialog box?

e.g. "The export you requested contains 88555 rows which may take a long time to return. It is recommended that you let the system email you the results instead of waiting".