Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Apex Code Development
- :
- expecting semicolon, found ':'
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
expecting semicolon, found ':'
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-05-2010 02:18 PM - edited 05-06-2010 08:08 PM
Any idea why would I get this message expecting semicolon, found ':' for the class below
;
Re: expecting semicolon, found ':'
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-05-2010 02:23 PM
In the line below, there's a ":" after lst_opencase. Should be an "=".
List<Id> lst_opencase : [SELECT c.OwnerId FROM Case c where c.RecordTypeId = '012300000001mEJAAY'and c.Status !='Closed' and c.Enhancement_Roadmap_Date__c < :dt];
Re: expecting semicolon, found ':'
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-05-2010 03:25 PM
Re: expecting semicolon, found ':'
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-05-2010 11:18 PM - edited 05-05-2010 11:28 PM
Date dt = System.Date.today();
List<Case> lst_opencase = [SELECT c.OwnerId FROM Case c where c.RecordTypeId = '012300000001mEJAAY' and c.Status ='Closed' and c.Enhancement_Roadmap_Date__c < :dt];
string[] arryOfIds = new string[lst_opencase.size()];
for(Integer I = 0; i < lst_opencase.size(); i++)
{ arryOfIds.add(lst_opencase[i].Id)}
Messaging.MassEmailMessage mEmail = new messaging.MassEmailMessage();
mEmail.setTargetObjectIds(arrayOfIds);
mEmail.setReplyTo('test@test.com');
mEmail.setSaveAsActivity(false);
mEmail.setTemplateId('00X300000017Ybx');
Messaging.sendEmail(new Messaging.MassEmailMessage[] { mEmail });
http://salesforcetrekbin.blogspot.com/
www.trekbin.com
Re: expecting semicolon, found ':'
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-06-2010 08:07 PM - edited 05-06-2010 08:20 PM
thanks sforce...the code will not work though since you can only send emails to leads,contacts or users..I was able to figure it out

