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
JonathanBJonathanB 

What is wrong with this OR Statement?

trigger saleInsertedTrigger on i360__Sale__c (after update) {
     for (i360__Sale__c S: Trigger.new) {
     
     if(s.EE_Service_Level__c = 'full' || s.EE_Service_Level__c = 'Audit Only'){
     
     }
    JCFS.API.createJiraIssue('Project ID', 'Issue Type ID');
}
Ajay K DubediAjay K Dubedi
Hi Sigora,
Try this:
trigger saleInsertedTrigger on i360__Sale__c (after update) {
     for (i360__Sale__c s: Trigger.new) {
     
     if(s.EE_Service_Level__c == 'full' || s.EE_Service_Level__c == 'Audit Only'){
     
     }
    JCFS.API.createJiraIssue('Project ID', 'Issue Type ID');
}

Inside if condition you need to compare conditions.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
JonathanBJonathanB
I'm getting 

User-added image
Meghna Vijay 7Meghna Vijay 7
Hi Jonathan,

Please add '}' bracket at the end.

Thanks
JonathanBJonathanB
I added the bracket now I am getting: 
"Error: Compile Error: Cannot save a trigger during a parse and save class call at line -1 column -1"

User-added image
Meghna Vijay 7Meghna Vijay 7
Hi Jonathan,

Did you change the name of the trigger and from the code editor text box?

Thanks
sumithasumitha
Hi,

Please refer this link
https://success.salesforce.com/answers?id=9063A000000lKzUQAU
Hope it Helps

Thanks
Sumitha P