Did anybody work on a universal constrain before?

I am working on adding a record owner field to our windows application to enable our sister company to work in the same environment as we are with only their records visible to them.
But I am running into a few issues with the constrain and Auto_Server_State.

In each Data Dictionary I have added an OnConstrain procedure that constrains the records by the CompanyIdno that the users account is associated with. (e.g. Constrain Customer.RecordOwner eq giCompanyIdno)
This works with the Customer Record but when I click on the Location.sl it is not showing the two locations. when I take the Auto_Server_State out, it shows me all locations from all customers that are owned by that company.

Anything helps. Ben