Since global variables can not be used in Filter criteria, I created a formula field, to pass it through. But referencing this formula (with global variable) in a Lookup Filter does not work
Custom Setting: CompetitionSettings__c
- Number: WinnerThreshhold__c
Custom Object: Participant__c
- Number: Rank__c
- Formula: IsAWinner__c [Rank__c == $Setup.CompetitionSettings__c.WinnerThreshhold__c]
This works so far and is displayed in the layouts. But as soon, as I try to reference this field in a filter criteria on a lookup, saving the criteria fails:
Custom Object: Price__c
Criteria: Participant__c.IsAWinner__c equals value TRUE
When I try to save this criteria, I get this Error message:
Error: Error in referenced formula IsAWinner__c, Field $Setup.CompetitionSettings__c.WinnerThreshhold__c does not exist. Check spelling.
But it exists and it works in other contexts
Everything I found online is this, where his statement at the end is:
It looks like the actual problem is any $ formula fields referenced in a lookup filter...
But there is no reference for this information.