You need to sign in to do that
Don't have an account?
HarrySie
FeedItem.ID is null
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?
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.
All Answers
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.
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
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.