How to Disable or Restrict the Export to Excel/XML Function in Sage X3

In today’s blog post, we’ll discuss options for disabling the Export button on the right-hand side of the screen or restricting which fields are exported for security purposes.
OPTION 1: DISABLING EXPORT BUTTON IN A MENU ITEM
You may be asked if it’s possible to disable the Export button in Sage X3 for security purposes. Unfortunately, this is built-in functionality that cannot be disabled without writing custom code to do this. Here is an Online Help Center article with information about using code to deactivate this feature. NOTE: This code disables the Export button for all users – you may decide to add code so it is more selective.
OPTION 2: RESTRICTING THE FIELDS EXPORTED
As an alternative, stopping particular fields from being exported to Excel/CSV or XML from a Menu Item may be sufficient – perhaps certain information is sensitive and shouldn’t be distributed via Excel/CSV or XML files.
When considering the Export functionality, you need to realize that it is based on extracting the information stored in the fields defined in the relevant Sage X3 Screens. To do this, we use a piece of built-in functionality related to Access Codes:
- Set up an Access Code, for example “ZDWNLD”
- You may have to untick “All access codes” and add the new Access Code to the Classic User in Parameters > User > Users (GESAUS)
- Set “Inquiry” and “Modification” to “Yes” – this will mean data is displayed in Fields with ZDWNLD Access Code, and allow them to modify those fields
- Set “Execution” to “No”
If the User was set up with “All access codes” before, the User may not have access to all the features they had previously once “All access codes” is unticked. For example, users would be able to go into Orders (GESSOH), but the “ALL” Entry Transaction won’t be available. This is because menu items may have their own Access Code, “ADMIN”. Unfortunately, this means that some analysis may need to be carried out so that appropriate Access Codes are added (with “Inquiry”, “Modification” and “Execution” all set to “Yes”) – perhaps even add all the Standard Access Codes as a last resort?
- Add “ADMIN” to the list of Access Codes
Note that Queries displayed on the standard Queries on Landing Pages may also have Access Codes, so their Access Codes may need to be added for the User(s).
- Add “RESSMAGA” to the list of Access Codes:
Note that this procedure doesn’t work if “ADMIN” User Function Profile is assigned to the User.
Here are a couple of examples to illustrate the process – one is for a particular Entry Transaction type, and the other is for Customer Entry.
Example 1 : Sales Order “ALL” Transaction Type
In this example, the CFO has asked that certain Users should not be able to download specific field-values to Excel/CSV or XML files – in this case, the “Carrier” details which are displayed as part of the “Delivery” Tab/Screen on “ALL” Transaction Type:
The screen behavior is controlled by Parameters > Sales > Entry Transactions > Orders (GESSLC):
Rather than hiding the field on the screen, the CFO would like it to still be displayed, and make the restriction User-specific instead, at the Export level.
With that in mind, the alternative is to change the actual Screens related to the “ALL” Transaction Type.
Check for Windows with the appropriate abbreviation, SOH in this case, to find the relevant Window and Screens:
And then drill-down into the appropriate Screen
In this case, WK2ALL12.
Assign the ZDWNLD Access Code to the BPTNUM field:
Once you’ve amended the Screen, Save and Validate, and that should be it – anyone with ZDWNLD Access Code will see these fields but they won’t be exported to Excel/CSV or XML.
Example 2 : Customer Entry
The CFO would like to stop some Users from sending out an Excel/CSV file with the Authorized Credit and Total Credit data for a Customer.
Again, assuming the initial Access Code and User setup are as before, assign the ZDWNLD Access Code to the appropriate fields:
Once you’ve amended the Screen, Save and Validate, and that should be it – anyone with ZDWNLD Access Code will see these fields but they won’t be exported to Excel/CSV or XML.
Please remember to set up an Activity Code to make sure these Customizations aren’t lost when upgrading!
CONCLUSION
There you have it, two ways of restricting the Export feature – the second one is more targeted in that it can be aimed at a User and Field level, but can have a high overhead in setting it up.
For more information about disabling or restricting the Export to Excel/XML function in Sage X3, or for any other Sage X3 questions, please contact us.
NOTE: Content for this blog post was originally posted on Sage City, June 30, 2023.