• Sohail Barat 14
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I have to write a trigger For the following case: "Client Issue Cases, when the field CSM__c is edited we want to add that person to case team with a role of Implementation Manager."

BUT I want to know either why the client is requesting to add portal user to case team member ?? I mean I want to know either why we add people to case team member ??? When it happens to made us to do so. ??
I am getting this error in my code:
Non-void method might not return a value or might have statement after a return statement.
My code is as under:
public class AccountHandler {
    public static Account insertNewAccount(String AcctName)
    {
        Account acct = new Account();
        acct.Name = AcctName;
        if(acct.Name == null)
        {
            return null;
        }
        else
        {
               return acct;
        }
     }
}
I am getting this error in my code:
Non-void method might not return a value or might have statement after a return statement.
My code is as under:
public class ContactSearch {
    public static list<contact> searchForContacts(String Surname,String PCode)
    {    
        list<Contact> ListIDandName = [select ID, name, phone from contact];
        for(Contact search: ListIDandName)
        {
            if(search.name==surname && search.MailingPostalCode==PCode)
            {
                return ListIDandName;
            }
        }
    }
}
I am getting this error in my code:
Non-void method might not return a value or might have statement after a return statement.
My code is as under:
public class ContactSearch {
    public static list<contact> searchForContacts(String Surname,String PCode)
    {    
        list<Contact> ListIDandName = [select ID, name, phone from contact];
        for(Contact search: ListIDandName)
        {
            if(search.name==surname && search.MailingPostalCode==PCode)
            {
                return ListIDandName;
            }
        }
    }
}
I am getting this error in my code:
Non-void method might not return a value or might have statement after a return statement.
My code is as under:
public class AccountHandler {
    public static Account insertNewAccount(String AcctName)
    {
        Account acct = new Account();
        acct.Name = AcctName;
        if(acct.Name == null)
        {
            return null;
        }
        else
        {
               return acct;
        }
     }
}
I am getting this error in my code:
Non-void method might not return a value or might have statement after a return statement.
My code is as under:
public class ContactSearch {
    public static list<contact> searchForContacts(String Surname,String PCode)
    {    
        list<Contact> ListIDandName = [select ID, name, phone from contact];
        for(Contact search: ListIDandName)
        {
            if(search.name==surname && search.MailingPostalCode==PCode)
            {
                return ListIDandName;
            }
        }
    }
}