+ Start a Discussion

Trigger to auto gen account number from closed-won opportunity

Hello All, I'm new to developing and was hoping I could get some assistance with this - or if it's even possible. I would like to auto generate an account number ONLY if it's opportunity is closed - won. Can this be done? Any help would be appreciated. Thx
Is the Account Number a custom field on the Opportunity or does it refer to a field on the Account.
If it is a field on Opportunity then you can simply use the after update trigger on Opportunity and generate an account number.

Satish Kumar
Thank you for your response. The account number is a field on the Account. I would like for the closed-won status of an Opportunity to trigger an auto generated number for the Account. Not sure if this is possible to create a trigger from one object tab to another. Thank you.