• Prachi Vijayvargiya
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi This is my code.

trigger trigger1 on Record__c(before insert,before update){
for(Record__c r:Trigger.new){
 if(r.Room_Type__c==Single Room){
  r.Discount_Per__c='5';
     }
   }
}

And the error i am getting is Compile Error: Extra ')', at 'Room'. at line 3 column 28.

Can someone help.
Hi This is my code.

trigger trigger1 on Record__c(before insert,before update){
for(Record__c r:Trigger.new){
 if(r.Room_Type__c==Single Room){
  r.Discount_Per__c='5';
     }
   }
}

And the error i am getting is Compile Error: Extra ')', at 'Room'. at line 3 column 28.

Can someone help.
Could someone provide the Apex code for a trigger that automatically pulls the opportunity creator/owner to the sales team on the oppty? 

Here is an example: 

User: John Smith
Profile: CDS

Whenever this guy creates (owns) an oppty, i would like him to immediately be added to the Sales Team with the team role "Sales - CDS"
* all of the team roles say "sales - " and then the department which always matches the profile name.

Can anyone help? :-)