You need to sign in to do that
Don't have an account?
XIO
Help with FeedItem Trigger - Trying to query attached File ID
Hello,
I have the trigger below that is retreving the FeedItem ID but I need it to retrieve the File ID when a file is attached to the feed. Any assistancw will be greatly appreciated.
I have the trigger below that is retreving the FeedItem ID but I need it to retrieve the File ID when a file is attached to the feed. Any assistancw will be greatly appreciated.
trigger FeedItemIDOppty on FeedItem (before insert,after insert, before update,after update) { List<Opportunity> O = [select id, File_ID__c from Opportunity where id =: Trigger.new[0].ParentId]; for(FeedItem fi : trigger.new) if(O.size()>0) O[0].File_ID__c = fi.ID; update O; }
All Answers
Compile Error: Unexpected token 'fi.Id'. at line 6 column 12