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
Manish DeshmukhManish Deshmukh 

Write a trigger when opportunity line item gets created or updated, Name of that Opportunity line item inserted into Account Description field, Account Is parent of Opportunity.

ANUTEJANUTEJ (Salesforce Developers) 
Hi  Manish,

You could use the below trigger to build your trigger as per your use case.

trigger opplin on OpportunityLineItem (before insert)
{
if(trigger.isbefore() && trigger.isinsert())
{
list<id> oid=new list<id>();
for(OpportunityLineItem o:trigger.new)
{oid.add(o.OpportunityId);}
List<opportunity> olist=new list<opportunity>();//all the records that can be parent records of the records that are about to be inserted.
/*Run a loop to update the values of the field value on the opportunity and then insert the updated records.*/
}
}

I hope this helps.

Regards,
Anutej