+ Start a Discussion
Ricki ReayRicki Reay 

Help! : Updating object linked to Opportunity Product when Opportunity Stage Name is Changed

Hi Everyone,

First off, for context, I am working within Salesforce's Financial Service Cloud financial package. With this package, there is a custom object called Financial Accounts. I have created a custom lookup on the Opportunity Product object so that users are forced (through validatoin rule) to link the valid Financial Account record with the Opportunity Product before marking their opportunity as "Closed Won". 

User-added image
So on the Opportunity Product "Add Product" form, there is a lookup(FinancialAccount) field "Financial Account" where I am trying to prevent users from being able to search/select any financial account that does not follow these parameters:

Record Type = Credit Card
Activated = TRUE
Linked to Won Opportunity = FALSE

I am getting close, but I am having trouble updating the Linked to Won Opportunity field so that I can use it in my lookup search criteria. 

What I am looking to build out is: when an opportunity linked to a valid (activated) credit card financial account record is marked closed won, I want a process to update that financial account record so that the field "Linked to Won Opportunity" = TRUE. I initially built out a process via PB that was initiated from the Opportunity Product object (as this allows me to link and update the Financial Account record), but then I realized that if a user changes the status of the opportunity to won, it is not prompting this process to won. I have hit a bit of a roadblock in trying to get the update from the opportunity object (i.e. status change to Closed Won) to initiate an update through to its opportunity products (that have a linked, valid financial account) then to the linked financial account to do the field update.

Does anyone have any ideas on how I could go about doing this? 

Thanks in advance for any and all ideas!

Ricki