You need to sign in to do that
Don't have an account?

Custom Label with SOQL
Has anyone been able to reference a 'Custom Label' value in a SOQL WHERE clause? I doubt it's possible but I thought I'd ask. I've had success referencing a custom label field in a Salesforce Custom Button URL for Conga Composer. The value of the Custom Label field gets passed into a Conga Query as a parameter:
Button URL to call Conga Composer and execute Conga Query with Where clause parameter:
https://www.appextremes.com/apps/Conga/PointMerge.aspx?sessionId={!API.Session_ID}
&serverUrl={!API.Partner_Server_URL_80}
...
&QueryID=[WPGrowth]a0LV0000000XX91?pv0=" '{!Account.Branch_Grouping_Code__c}' AND
Year__c = '{!$Label.Financial_year}' "
You can assign a label to any local variable and then use that varibale in SQOL query.
e.g. integer days = integer.valueof(Label.labelname)
In query in salesforce you can access label neither in SOQL not in it's where clause.