function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
P KP K 

Query issue

query like first check Partner level and depend on Partner Level , it will filter out Message for each Partner Level. It will be kind of dynamic SOQL with comparison kind of each values of Partner level.
[SELECT Id,Name, Channel__c,Partner_Level__c
                        FROM MessageAlert__c
                        WHERE Channel__c = 'Partner' AND
                        Partner_Level__c INCLUDES ('Diamond , Gold')];




Ankit AroraAnkit Arora
Not able to understand what exactly you need here? If values in Partner_Level__c in where clause depends on Channel__c? then you've to write the if else conditions and make your query dynamic, still if you can explain in more better way may be would be able to help more.
P KP K
when user select Channel value is equal to Partner(pick list value) and then displayed value in dependent pick list for Partner Level which have multi pick list values (Diamond , Gold). now depend upon Partner Values , we want to show different different message for each so particular Partner level user can see own message alert , not others.
P KP K
Depend upon Partner level, message will be filter out
P KP K
Depend upon Partner level, message will be filter out and get record.
P KP K
bind variables only allowed . error message getting.

SELECT Id,Name, Channel__c,Partner_Level__c FROM MessageAlert__c WHERE Channel__c = 'Partner' AND Partner_Level__c INCLUDES (:partnerLevel)
asish1989asish1989
Try to use IN in query
Guna sekaranGuna sekaran
Try  this

[SELECT Id,Name, Channel__c,Partner_Level__c
                        FROM MessageAlert__c
                        WHERE Channel__c = 'Partner' AND
                        Partner_Level__c INCLUDES ('Diamond ;Gold')];