Hi,
is there a way to prevent the export of the data and document from the view/search?
best, uros
Hi,
is there a way to prevent the export of the data and document from the view/search?
best, uros
You can hide or disable built-in commands such as "Export" with a UI extension.
Sample code (no support or guarantee of functionality given):
"use strict"; function OnNewShellUI( shellUI ) { /// <summary>The entry point of ShellUI module.</summary> /// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param> // Register to listen new shell frame creation event. shellUI.Events.Register( Event_NewNormalShellFrame, newShellFrameHandler ); } function newShellFrameHandler( shellFrame ) { /// <summary>Handles the OnNewShellFrame event.</summary> /// <param name="shellFrame" type="MFiles.ShellFrame">The new shell frame object.</param> // Register to listen the started event. shellFrame.Events.Register( Event_Started, getShellFrameStartedHandler( shellFrame ) ); } function getShellFrameStartedHandler( shellFrame ) { /// <summary>Gets a function to handle the Started event for shell frame.</summary> /// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param> /// <returns type="MFiles.Events.OnStarted">The event handler.</returns> // Return the handler function for Started event. return function() { // Hide export objects command shellFrame.Commands.SetCommandState( BuiltinCommand_ExportObjects, CommandLocation_All, CommandState_Hidden ); // Hide export search bar conditions command shellFrame.Commands.SetCommandState( BuiltinCommand_ExportSearchBarConditions, CommandLocation_All, CommandState_Hidden ); }; }
You can hide or disable built-in commands such as "Export" with a UI extension.
Sample code (no support or guarantee of functionality given):
"use strict"; function OnNewShellUI( shellUI ) { /// <summary>The entry point of ShellUI module.</summary> /// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param> // Register to listen new shell frame creation event. shellUI.Events.Register( Event_NewNormalShellFrame, newShellFrameHandler ); } function newShellFrameHandler( shellFrame ) { /// <summary>Handles the OnNewShellFrame event.</summary> /// <param name="shellFrame" type="MFiles.ShellFrame">The new shell frame object.</param> // Register to listen the started event. shellFrame.Events.Register( Event_Started, getShellFrameStartedHandler( shellFrame ) ); } function getShellFrameStartedHandler( shellFrame ) { /// <summary>Gets a function to handle the Started event for shell frame.</summary> /// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param> /// <returns type="MFiles.Events.OnStarted">The event handler.</returns> // Return the handler function for Started event. return function() { // Hide export objects command shellFrame.Commands.SetCommandState( BuiltinCommand_ExportObjects, CommandLocation_All, CommandState_Hidden ); // Hide export search bar conditions command shellFrame.Commands.SetCommandState( BuiltinCommand_ExportSearchBarConditions, CommandLocation_All, CommandState_Hidden ); }; }
© 2024 M-Files, All Rights Reserved.