AnsweredAssumed Answered

How to limit creation of line items based on the status of the service order they are related to?

Question asked by McIrish on Nov 19, 2015
Latest reply on Nov 19, 2015 by Mike_Mitchell

Using FM13 and 14. I have a database we have been using for years and someone just pointed out a pretty big flaw. To simplify this, I have two tables: Service Orders and Line Items. The service order form has a portal to the line items. The relationship is setup so that I can create new line items from inside the service order. This has always worked as it should. I have a field in both the service order and line item tables labled "locked". My security settings are set to limit editing and deletion of a service order to only when the locked field is 0. Once the service order is closed, a script automatically sets the locked field to "1". The same is true for the line items. Both of those work fine. You cannot edit or delete the service order of the line items if the locked fields are locked=1.


Here's the problem.

When you are setting up security, it does NOT allow me to select Limited for Create of the line items. So.... people can add a line item to a closed service order. View, Edit and Delete all have the "Limited" option, but Create is only yes or no. There must be some way around this.


How can I get security working correctly to prevent new line items from being created on closed service orders?