You need to sign in to do that
Don't have an account?

How do I update an account from a Quote's approval process?
As a final step in our approval process for a quote I'd like to be able to update the account and set the Type to "Customer", I know I can't do it with a field update because both relationships between Quote/Opportunity & Opportunity/Account are lookups and not master/data.
Is there a best practice for this kind of thing, I would imagine it's a pretty common thing to want to do?
Is there a best practice for this kind of thing, I would imagine it's a pretty common thing to want to do?
1. Create new custom field on Quote (and Opportunity) called "Change Account type to". Don't add it to any layouts (i.e. it's hidden)
2. In your approval process set the final step to update the Quote / Opportunity "Change Account Type to" field to "Customer"
3. You'll need a trigger now! Create an "on update" trigger on Quote
4. Detect if the Change Account Type to field has changed value
5. If so, update the Record Type of the Account via the lookup relationship
6. Save changes the Account
I'm guessing it's steps 4/5 you'll need a hand with. As I say, I'll try and flesh this out when I have a spare minute.
Cheers,
Ray
All Answers
1. Create new custom field on Quote (and Opportunity) called "Change Account type to". Don't add it to any layouts (i.e. it's hidden)
2. In your approval process set the final step to update the Quote / Opportunity "Change Account Type to" field to "Customer"
3. You'll need a trigger now! Create an "on update" trigger on Quote
4. Detect if the Change Account Type to field has changed value
5. If so, update the Record Type of the Account via the lookup relationship
6. Save changes the Account
I'm guessing it's steps 4/5 you'll need a hand with. As I say, I'll try and flesh this out when I have a spare minute.
Cheers,
Ray