Is "steve" an account name or a privilege set name? There are get functions to check either so the script is basically the same though I recommend privilege set names if at all possible as this is more flexible as "Steve" might not always be the person you want to send directly to the Invoices layout in the future, but their privilege set name is likely to be the same.
If [Get ( accountPrivilegeSetName ) = "Sales" ]
Go To Layout [Invoices]
Go To Layout ["Main Menu"]
Simply use File Options in the file menu to select the above script to run when the file is opened.
Steve is the UserName.
Your idea sound better. But i can not find Get "( accountPrivilegeSetName )" under the get menu. Is is available in FMP 10.0v3?
Get (PrivilegeSetName) is what you're looking for...
It's a filemaker 11 function. In filemaker 10, you'd use Get ( privilegeSetName ).
The difference between the two functions is that Get ( PrivilegeSetName ) returns "[Full access]" if the "run with full access permission" has been selected for the script where Get ( accountPrivilegesetName ) will still return the expected privilege set name. As long as your "on open" script doesn't have that option selected, either function can be used.