• ishaan singh dhillon
  • NEWBIE
  • 15 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I am trying to write a trigger on Case object where I am trying to retreive the number of how many contacts have the same email as the email from which the case has originated in the web-to-case scenario. But I am getting the error on the first line itself, the error msg is :

Error: Compile Error: Unexpected token '='. at line 3 column 53

I know the code might not be perfect as I am still learning so I am seeking help, the following is the code I have till now:
trigger CountContact on Case (before insert) 
{
    Case.Count_of_Records_with_Web_email_address__c = [select count() from Contact where Contact.Email = Case.SuppliedEmail];
    
    if (Case.Count_of_Records_with_Web_email_address__c > 1)
    {
        return;
    }
    Else
    {
        Contact Cont = [select Contact from Contact where Contact.Email = Case.SuppliedEmail];
        Case cas;
        cas.Email = Cont.Email;
        cas.Account = Cont.Account;
    }
}

Thanks in advance.

Regards.
Hi All,

I am fairly new to apex programming and not able to figure out why the following line of code is not working for me :
<apex:outputPanel layout="panel" style="width: 100%" rendered="{IF({!Case.Type}=='Update Account')}">

The requirement is that if the value in Type piclist standard field on case object is Update account then the contect in this panel should be displayed.

Thanks in advance for your help.

Ishaan.
Hi All,

I am fairly new to apex programming and not able to figure out why the following line of code is not working for me :
<apex:outputPanel layout="panel" style="width: 100%" rendered="{IF({!Case.Type}=='Update Account')}">

The requirement is that if the value in Type piclist standard field on case object is Update account then the contect in this panel should be displayed.

Thanks in advance for your help.

Ishaan.