I don't want to have to use a find script to do this if possible. I just want each layout to automatically only show those types of contacts assigned to them.
But a find script performed by script triggers is one method of "automatically only show those types of contacts". This can include custom menus and a trigger controlled script that constrains the found sets of user initiated finds to keep all other contact types out of the found set.
Your only other option is to use a relationship and then a portal to contacts can be filtered to only list contacts of a specific type.
Okay. If that's my best option then that works. Is there a way to set up a script to run when opening a layout that will filter the records as soon as the layout is opened?
I can't really tell you if it's your best option or not. And you could actually use one layout for this purpose (if the overall layout design is the same in each case) instead of multiple layouts just by passing different data as a script parameter to the script to select for different contact types.
OnLayoutEnter is a trigger that will perform a script each time that you enter the layout. Use it with caution. There are a number of basic data manipulation scripts that typically change layouts to do some work and then change back. These scripts will also trip this trigger and that could change what record is the current record unless you take steps to keep the scripts from tripping this trigger.
Okay thank you. I think this will work for me. I need different layouts because depending on the type of contact I want to display different information in a different way. Thank you very much for your help!
I don't know if this will benefit your situation, but here's a thread where I received help. I ended up using tab panels that would show different fields based on the customer type as you scrolled thru the records using an OnRecordLoad script trigger.
I think DaSaint's sample file may still be up there