function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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