I tried this one and It does nothing. Both zipped and on folder
I'm looking for a way to hide items from second mouse click context menu and that sample should get me going if it would do something. Latest M-Files Online.
Cheers
PJ
I tried this one and It does nothing. Both zipped and on folder
I'm looking for a way to hide items from second mouse click context menu and that sample should get me going if it would do something. Latest M-Files Online.
Cheers
PJ
Hi PJ,
I have just installed this to my local vault and it seems to work. If I right-click on a single object then I get a command listed entitled "My command". If I select multiple objects, or I right-click on a view, then the command is not there.
Note that this project only targets the M-Files desktop, not anything else.
Did you install the application and then log out (not just close the window) and log in again?
Regards,
Craig.
This one hides Create menu from context menu
shellFrame.Commands.SetCommandState( BuiltinCommand_NewObject, CommandLocation_ContextMenu, CommandState_Hidden );
Is there a way to hide elements under Create menu like BuiltinCommand_NewObject.141 that would hide creation of object with ID 141 ?
I don't believe so. One thing you could do is react to the "OnBuiltInCommand" event (M-Files UI Extensibility Framework - OnBuiltinCommand Event) and check the parameter provided. This gives you the object type ID (e.g. 141). If you return false from this event handler then it effectively cancels the operation.
So it doesn't hide the option, but it does help stop users using it.
There may be some non-code options (e.g. to stop the creation of objects of this type via the M-Files Admin), but I assume that you've exhausted those...?
© 2024 M-Files, All Rights Reserved.