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

Can someone help me break this IF statement into a nested IF statement so I can add system.debug between the conditions?
if( ('Closed Won' == o.StageName) && ('Closed Won' != opportunityOldMap.get(o.Id).StageName) && (!o.Line_of_Service__c.contains('Agawam')))Can someone help me break this IF statement into a nested IF statement so I can add system.debug between the conditions? Thanks
All Answers
I added your code, then ran the test class. The first line of code "if('Closed Won' == o.StageName){" is blue for code coverage, but the System.debug('Condition 1') statement isn't showing up in the log. Do you know why it isn't? The next two Conditions are red for code coverage and those Conditions aren't showing up in the logs either. Condition 0 is showing up in the log.
I'd recommend adding another System.debug above it, where Condition 0 is, to check what StageName is. It's possible something else in the code is causing an issue