Disallow create or delete record on read-only form

I created a new entry form for the UD02 table, then created a second menu item with Read-Only set to use as a tracker. This works for all fields, but a user with access to the read-only form can still create new records and delete old records. What’s the best way to prevent those actions to make the form truly read-only like the system provided trackers?

I may think about is create a security group RW and another Read only. Assign the users to the proper group and the menus as well…

Then in Method Directive (System) the UD02 GetaNewUD02 and DeleteByID , add a preprocess to check if user is part of the Readonly security group, show an exception message and the action will not be permitted…

Did not test, but I think that would work.

You could also maybe catch in code, the selection of those menus, and cancel their actions? Actually I prefer that way as only one form could be maintained…as upon loading you could retrieive if the current user is part of the readonly or RW group, and when catching the menu actions, allow or disallow depending of which group they belong…?

Pierre

Fixed. Apparently Read-Only in menu-maintenance works as desired by disallowing new/delete only after a restart of the Epicor client, just like adding a new menu.