function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
brielea1984brielea1984 

Visualforce, Custom Settings, and related lists

I'm going to do my best to explain this, I'm having trouble understanding and envisioning how custom settings works:

We have an object called "Program Intakes", in which the user will select a program for which they are doing an intake for. They select a Program through a lookup field on the Program Intake object.

We have several objects that lookup to the program intake consisting of various demographic info. For brevity's sake I'll use just one - housing history.

Housing history has various record types.

We are trying to create a custom setting where when a certain program is selected, only 1 record type is available on the housing history related list when creating a new record. Here is an example of the custom setting, where should the user select "Long Term Housing" as the program, when creating a new "Housing HIstory" record, only Record Type 1 is available.

Name: HousingLTHCMA                           Object Name: Housing History
Object ID: 01Id0000000ujiK                       Program Name: Long Term Housing
Program ID: 01tK0000000GeGa               Modality: Name CM Adult
Modality ID: a15K0000000D5N8               Record Type Name: Record Type 1
Record Type ID: 012K00000004SNL       Composite ID 01Id0000000ujiK01tK0000000GeGaa15K0000000D5N8

I know when creating a visualforce page I need it to reference this setting, but I'm just not clear on how to do this. Do I do this on a visualforce page for the program intake? Or do I do it on a visualforce page for Housing History? How should this look?Does this require apex code?

Any help would be much appreciated, please send a question if you think you know an answer but aren't clear on my question.

Thanks!