You need to sign in to do that
Don't have an account?
Lightning Cobra
Apex Trigger Help, using INCLUDES in SOQL
Hello,
Contacts are created by users which has a multi select picklist to capture candidates skillset.
Job records are created by users which has a multi select picklist to capture what skill set is needed.
Requirement: Whenever a job record is created, based on what skill set is needed the system needs to find the corresponding contacts (candidates) matching atleast 1 skillset and email them job record.
Contacts are created by users which has a multi select picklist to capture candidates skillset.
Job records are created by users which has a multi select picklist to capture what skill set is needed.
Requirement: Whenever a job record is created, based on what skill set is needed the system needs to find the corresponding contacts (candidates) matching atleast 1 skillset and email them job record.
trigger JobTrigger on Job__c (after insert) { Set<String> SkillCode = new Set<String>(); // when a new job is posted, based on Skill_Code__c on job record, get matching contact records based on Candi_Skill_Codes__c for (Job__c J : Trigger.new) { // Skill_Code__c is a multi select picklist value if (J.Skill_Code__c != null) { List<String> JobOrderSkillCode = J.Skill_Code__c.split(';'); SkillCode.addAll(JobOrderSkillCode); } } //Candi_Skill_Codes__c is a multi select picklist value for (Contact C : [SELECT Id, Alert__c, Candi_Skill_Codes__c FROM Contact WHERE Candi_Skill_Codes__c INCLUDES (:SkillCode) AND Alert__c = 'Yes']) { // Above query returning 0 results // If i change the query to something like, // SELECT Id, Alert__c, Candi_Skill_Codes__c FROM Contact WHERE Candi_Skill_Codes__c INCLUDES ('sfdc', 'developer') AND Alert__c = 'Yes' // This query returned 2 results // I understand bind variables cannot be used with INCLUDES but i also don't know how to proceed in this scenario, please help } //Send an email to matched contacts }
I have specially created a formula that you can directly use to fulfil your requirement of always setting a weekday on any input
If you found it useful please appreciate my efforts and mark it as the best answer
Regards,
Soyab
All Answers
I have specially created a formula that you can directly use to fulfil your requirement of always setting a weekday on any input
If you found it useful please appreciate my efforts and mark it as the best answer
Regards,
Soyab