You need to sign in to do that
Don't have an account?

Help Trigger failes to update opportunitylineitem
I am trying to get this trigger to update a new, test field (TEXT FIELD, 18 bytes) with the ID of the Opportunity Line Item and the error that I am receiving is Id not specified in the update call.
trigger New_Feed_Update on OpportunityLineItem (after update) { //setup a feedpost array List<FeedPost> posts = new List<FeedPost>(); //Create a new, empty list to add the Socket ID's to update List<OpportunityLineItem> oppGetIds = new List<OpportunityLineItem>(); //mike_test__c for(OpportunityLineItem oppids : Trigger.new) { OpportunityLineItem Opp = new OpportunityLineItem(); Opp.will_test__c = oppids.id; OppGetIds.add(Opp); } Database.update(OppGetIds); }
I thought that the ID was already identified in the update call
Can someone please help me fix this trigger
Srini
Actually I messed around with your code a little and changed one line
and one thing that I did not know, but now do, is that before insert or before update will update the record
Thanks for your help and guidance
~Mike
All Answers
Srini,
I applied your chages and tried you trigger and it does not work, thanks for trying though, Appreciate it
I changed my trigger to match your code to before update and ran it as is. DId not update anything
also if I run your code as you posted it, it does not perform anything
Do you mind taking a look at my newer code above and see if you can guide me through it
~Mike
Srini
Actually I messed around with your code a little and changed one line
and one thing that I did not know, but now do, is that before insert or before update will update the record
Thanks for your help and guidance
~Mike