If the %1 field is not blank, there must be a record in the %2 table. If the record is not found, make sure the user has ...

If the %1 field is not blank, there must be a record in the %2 table. If the record is not found, make sure the user has permission to perform a cross-company select on this table. The security framework will allow the select statement to return records for the companies in which the current user has explicit access of the tables involved. Therefore, it will return 0 records if the user does not have explicit access to the tables even if the tables are not AOSAuthorization-protected.