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
Ankita dixitAnkita dixit 

inserting opp records want name of the opportunity records, its has to be name and whatever name given to that opp.

inserting opp records want name of the opportunity records, its has to be name and whatever name given to that opp.
AnkaiahAnkaiah (Salesforce Developers) 
Hi Ankita,

Can you explain more about your requirement?  

Thanks!!
Ankita dixitAnkita dixit
want to insert records in opportunity and want Name of the opportunity records, its has to be name and whatever name given to that opp.
AnkaiahAnkaiah (Salesforce Developers) 
As per my understanding, when opportunity created with any name then you need to update it as opp name = name. If my understaning is corrent then try with below code.
 
trigger NameUpdate on opportunity (before insert){

if(trigger.isinsert && trigger.isbefore){

for(opportunity opp: trigger.new){

opp.Name ='Name';
}
}
}

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​