I'm trying to filter to a product to make searching for a specific product easier for users. The goal is to have a chain of dependent option sets that ends in a lookup field that only displays records with the previous values. The products are all textbooks. The chain goes as such:
-Grade -Language -Editorial -Component (eg. textbook, workbook, atlas, etc) -Product Lookup
All the previous values are option sets that are available on the Product form because each Textbook has a grade level, language, editorial, and component.
I've found how to implement dependent option sets and filtered lookups online but I can't find a way to relate the two. I tried using only filtered lookups but it seems that would only work if I create separate entities for Grade, Language, Editorial, and Component and relate them all.
Does anybody have an idea of how I can achieve my goal?
You can retrieve the values of the Option sets and then use the addPreSearch method to filter the lookup.
Your code could be similar to the code below: