Counting the number of different values from a related field
I have a layout that lists quote line items and displays the parent quote document information in the header. The layout is accessed via a script that incorporates a find such that only records related to any one quote (parent) should be found.
If quote line items are deleted the search could potentially result in showing all quote line item records for all quotes. This is problematic and as an additional fail safe I wish to disengage (hide) several buttons and controls from the layout if the found set includes records from more than one parent quote.
I can't conceive of the calculation that would allow for this hide function or for a script to check on this status.