I have a Vendor attribute of ProjectVendor that is defined as a drop down in the presentation for the attribute. I need to filter the drop down items, so I select filter, and then choose custom query. When defining the rule in code for that FIND, the context of the main object ProjectVendor (that contains the attribute) is lost. So custom queries do not work when dependent on current context objects.
Custom query code for Vendor, when adding a new ProjectVendor instance:
FIND Vendor WHERE Vendor IN ProjectTypeVendor.Vendor AND ProjectTypeVendor.ProjectType=ProjectVendor.Project.ProjectType
In the above, both project and vendor are attributes of ProjectVendor.
ProjectVendor context should get passed to the query