+ Start a Discussion
sreeja gangishettysreeja gangishetty 

Trigger to update the field when the record is fisrt created but not every time it is created.

When I convert the opportunity to the project, then the 'Project number' field starts with 'SRM4011000' format. If I convert a single opportunity into many other sub level projects then the 'Sub level project number' field starts with 'SRM4011001' format. and every time a new sub level project is created the 'Sub level project number' will be increased by 1.

Now I have a requirement, to update the field from project to opportunity when the project is created for the first time but not every time the project is created.
Can anyone please help me solve this?

Thanks in advance
Lokesh KumarLokesh Kumar
Write a trigger on Project event after insert and have the condition to check if the field has value. If Yes don't update the Opportunity.

I hope it will give you some direction to write the logic.