+ Start a Discussion
Sreekanth NaraboinaSreekanth Naraboina 

Update standrard list price from pricebookentry object to Field team target (EAV ) field on trigger

trigger Pricebookentry on Priority_Item_Targets__c (before insert) {
 for (Priority_Item_Targets__c p : Trigger.new) { 
     PricebookEntry pbe = [SELECT Id, Product2Id, UnitPrice, IsActive FROM PricebookEntry limit 1];
     p.Opportunity_Size__c = pbe.UnitPrice;
   } 
}
 please update my logic