Field Security Plus allows you to apply mandatory restrictions or prevent users from making changes during custom events, known as Event Triggers.
Simple vs. complex scenarios
Applying restrictions to fields directly using Field Security Plus works for simple tables, but can become an issue on complex tables where modifying one field will also modify other fields.
Take for example Sales Line, where modifying Quantity can also indirectly modify Unit Price, if you have Sales Prices setup for specific quantities.
A common setup here would be to restrict users from directly modifying Unit Price but not Quantity, as you want to make sure Unit Prices are inline with your Sales Price setup.
Built-in Event Triggers
Field Security Plus comes with built-in Event Triggers for Unit Price, Line Amount, Line Discount %, and Line Discount Amount fields on the Sales Line table, restricting direct modifications to these fields, while allowing indirect modifications originating from other fields.
- Navigate to Field Security Table Setup.
- Select the desired field.
- Drill-down on No. of Event Triggers.
- Create a new record, and select Add Event.
- Select the desired Event Trigger and select OK.
- Repeat step 4 and 5 for each Event Trigger you want to add, and then close the Event Triggers page.
- Optionally, select Restrict/Mandate Event Triggered Changes Only, this will make restrictions only apply to Event Trigger changes only, and not apply to direct user changes.
Custom Event Triggers
You can build on the Event Trigger functionality in your own app by extending Field Security Plus, which allows you to select your own trigger to determine when Field Security Plus restrictions are applied.
- Implement the
FSG_FS_IEventTrigger
interface. - Extend the
FSG_FS_EventTrigger
enum with your new implementation. - Where required, call
FSG_FS_IntegrationHandler.InvokeEventTrigger
to invoke a Field Security Plus restriction check.