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
LloydSLloydS 

Cross Object Workflow: Update Account Custom Field Based Upon Opportunity Stage / Won / Lost

I have a custom field on Accounts called "Client Rating". I want to update that field automatically whenever the stage on an Opportunity with the type "New Client" changes as follows:

OPPORTUNITY STAGE > ACCOUNT CLIENT RATING

ANY (e.g. when opportunity is created > Prospect
Contracting > Contracting
Opportunity Won > Client
Opportunity Lost > Former Prospect

I know I can't do this using normal workflow. I downloaded XObject from the appexchange but can't figure that out.

How do I do this?
LloydSLloydS

Not sure if I'm on the right track. But I created a field in Opportunities called "Account Client Rating". I then created a workflow to populate that field with a specific number depending upon the stage of the opportunity.

 

Subsequently I created a rollup field in Accounts referencing the newly created "Account Client Rating" in opportunities. So whenever the field is updated in Opportunities, it is obviously reflected in the Account field.

 

But now I need to update the actual Client Rating field in Accounts. So whenever the rollup field is updated via Opportunity, the Client Rating field in Account is updated. This requires opening up the account and doing an edit/save.

 

So I need to either do something in Apex or use xObject, neither of which I know how to do.

 

Your help would be appreciated.