• pharaway
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Can someone point me in the right direction?  I am new to sforce, so please bare with me ...
 
I have created html forms using web-to-case.  When these cases are created in sforce, I want the Status field on the Contact table to be updated with different values based on what type of case was submitted (either Travel Request, Expense Report, or Academic form).  The Case is attached to the Contact record based on email address.
 
I thought maybe I should create a trigger on the Case object.  This is what I came up with .. but am getting an error.  Since this is new to me, I don't even know if I created it correctly or not ... or if there is another way I should do this.
 

trigger UpdateContactStatus on Case (after insert) {

if (Case.Reason = 'Travel Request')

    {Contact.Status__c = 'Received Travel Request from Candidate';

    }

  }

 

This is the error: 

Error: Compile Error: Expression cannot be assigned at line -1 column -1

 

Any help is much appreciated!
 
Thanks,
Paige
Can someone point me in the right direction?  I am new to sforce, so please bare with me ...
 
I have created html forms using web-to-case.  When these cases are created in sforce, I want the Status field on the Contact table to be updated with different values based on what type of case was submitted (either Travel Request, Expense Report, or Academic form).  The Case is attached to the Contact record based on email address.
 
I thought maybe I should create a trigger on the Case object.  This is what I came up with .. but am getting an error.  Since this is new to me, I don't even know if I created it correctly or not ... or if there is another way I should do this.
 

trigger UpdateContactStatus on Case (after insert) {

if (Case.Reason = 'Travel Request')

    {Contact.Status__c = 'Received Travel Request from Candidate';

    }

  }

 

This is the error: 

Error: Compile Error: Expression cannot be assigned at line -1 column -1

 

Any help is much appreciated!
 
Thanks,
Paige