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
- :
- Chatter Development
- :
- FeedItem.ID is null
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
FeedItem.I D is null
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 09:49 AM
Hello I've written a trigger to comment feeditems with special keywords. The problem is, that the feedItem.ID is null and so the insert comment fails. Why is the feeditem.ID null?
Solved! Go to Solution.
Re: FeedItem.I D is null
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 12:40 PM
If your trigger is set to before insert... you don't have an id yet. It needs to be inserted into the database first.
If you're just altering the data prior to insert you shouldn't need to do any DMLs on that particular record.
Alex Acosta
Re: FeedItem.I D is null
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-15-2012 01:03 AM
Hello Alex,
yes, that was a stupid question. I thought I implemented an after insert trigger, but in fact it was a before insert one.
Thanks
Harry
Alex.Acosta wrote:If your trigger is set to before insert... you don't have an id yet. It needs to be inserted into the database first.
If you're just altering the data prior to insert you shouldn't need to do any DMLs on that particular record.
Re: FeedItem.I D is null
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-15-2012 07:52 AM
There are no stupid questions Harry. I've made silly mistakes like this in the past, and hey, if it helps someone resolve a similar issue., then it makes the post worthy as well.
Alex Acosta

