• jboardman
  • NEWBIE
  • 10 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I need a little help making a slight change to an apex class. 

Current code:

if (UnitType == 'New Unit')
       wherestr += 'And Family != \'Refurbished\' ';
   else if (UnitType == 'Refurbished Unit')
       wherestr += 'And Family = \'Refurbished\' ';

Need it to have an OR statement to exclude or include (respectively) a second product family of Spare Parts like whats below, but that isn't correct and is where I need help.

if (UnitType == 'New Unit')
      wherestr += 'And Family != \'Refurbished\'  OR \'Spare Parts\' ';
  else if (UnitType == 'Refurbished Unit')
       wherestr += 'And Family = \'Refurbished\' OR \'Spare Parts\' ';
I need a little help making a slight change to an apex class. 

Current code:

if (UnitType == 'New Unit')
       wherestr += 'And Family != \'Refurbished\' ';
   else if (UnitType == 'Refurbished Unit')
       wherestr += 'And Family = \'Refurbished\' ';

Need it to have an OR statement to exclude or include (respectively) a second product family of Spare Parts like whats below, but that isn't correct and is where I need help.

if (UnitType == 'New Unit')
      wherestr += 'And Family != \'Refurbished\'  OR \'Spare Parts\' ';
  else if (UnitType == 'Refurbished Unit')
       wherestr += 'And Family = \'Refurbished\' OR \'Spare Parts\' ';