export to email

Amrit4
Tera Guru

I have a requirement to disable this popup. Even if the export data exceeds a defined limit the system should not allow email export. Rather it should restrict the user from exporting it with a message that export limit has been exceeded

 

Amrit4_0-1681501860011.png

 

Please help me with this

9 REPLIES 9

Bert_c1
Kilo Patron

Hi,

 

The suggestion of a BR won't work, actually defining a BR as suggested proved that.  The Export Limit feature is defined here:

 

https://docs.servicenow.com/bundle/utah-platform-administration/page/administer/exporting-data/conce...

 

And for some tables, there are UI actions:

 

https://[instance_name].service-now.com/sys_ui_action_list.do?sysparm_query=GOTOnameLIKEexport&sysparm_view= 

 

I have no idea how you would enforce export limits in general without changing the related system property for the export type. Define those in the documentation if they don't exist in the sys_properties table to override the default value in the documentation.

 

Mayby other Community members can comment on disabling the email choice when exporting data. You may propose that capability, see:

 

https://docs.servicenow.com/en-US/bundle/utah-it-business-management/page/product/innovation-managem...

Thanks for your response @Bert_c1  and @Rahul Kumar17 

 

Is there any way we can restrict this input email to only a particular domain like "@abcd.com" instead of all types of domain

Hi Amrit4,

 

I believe that feature is designed to prevent a session timeout when exporting a "large" amount of data.  The user session is subject to the Transaction Quota Rule named 'UI Transactions', which is 298 seconds OOB. The export transaction can fail if that time limit is exceeded. To avoid that, the export can be done in the background and a email notification sent once it is done.  And I expect the attachment can exceed some email-related limit and for that, the email delivery would fail.

 

I do not work email configuration in the instance. There may be some 'System Notification' or 'System Policy' related to email that can do what you want, but you'll need to read the related documentation or maybe some Community member has a suggestion.

Hi Amrit,

 

Yes, it is possible to restrict input email to a particular domain like "@abcd.com" in ServiceNow. One way to do this is by using a client script in the form of a script include.

Here's an example script that you can use to achieve this:

// Define the allowed email domain
var allowedDomain = "@abcd.com";

// Get the email field element
var emailField = g_form.getControl('email_field_name');

// Get the value of the email field
var emailValue = emailField.value;

// Check if the email is valid and belongs to the allowed domain
if (emailValue && emailValue.indexOf('@') > -1 && emailValue.split('@')[1] !== allowedDomain) {
  alert('Email must belong to ' + allowedDomain);
  emailField.value = '';
}

 

You can replace 'email_field_name' with the actual name of the email field in your form. This script will check if the email entered in the field belongs to the allowed domain. If it doesn't, it will show an alert message and clear the email field.

 

Thanks,

Rahul Kumar

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar

Thanks a ton for your answer @Rahul Kumar17 

However i want this to happen while we try to export a large data table and it asks for an email there. Below screenshot is for your reference:

Will it work here?

Amrit4_0-1682504754193.png