You need to sign in to do that
Don't have an account?
NM
How can I write a trigger on OpportunityPartner Object ???
Hi,
I need to populate a field value when a new Opportunity Patrner is created.
How can I use a trigger on this event?
When I use the following code, I get an error message:
Error: Compile Error: SObject type does not allow triggers: OpportunityPartner at line 1 column 34 |
trigger GetPrimaryPartnerName on OpportunityPartner (after insert) {
Opportunity[] currOppt = trigger.new;
Account[] Accnt;
OpportunityPartner[] OppPartner;
OppPartner = [select AccountToId from OpportunityPartner where OpportunityId = :currOppt[0].Id AND IsPrimary = true];
Accnt = [select Id, Name from Account where Id = :OppPartner[0].AccountToId];
currOppt[0].Partner_Name__c = Accnt[0].Name;
}
Is there a solution for that?
Thank you,
Noa.