Help

Re: Update other records in same table based on linked field

Solved
Jump to Solution
1617 0
cancel
Showing results for 
Search instead for 
Did you mean: 
jwag
6 - Interface Innovator
6 - Interface Innovator

Hi,

In our base we have multiple Proposals in one table against each linked Sales Opportunity in another table. One Proposal will be the Primary Proposal and any others will be Secondary. This is done by selecting Primary or Secondary as a single select.

If a Secondary Proposal is changed to Primary, I'd like any other Proposals linked to this Opportunity to automatically be changed to Secondary, to avoid there being multiple Primaries.

Is there a way to automate this?

Many thanks

1 Solution

Accepted Solutions
Ben_Young1
11 - Venus
11 - Venus

Hey @jwag

This one is a bit of a doozy to explain, so bear with me.
There are a couple of ways to approach this.

To answer your question directly: Yes, there is a way to automate this.
From what you've described, it seems like you would create an automation that is triggered when a proposal record is updated to being the primary proposal.

They would execute a Find records action that would search for all proposal records that are linked to the original opportunity but are not the original proposal record that triggered the automation.
From there, you'd iterate through the found records and change the value of the single select field to reflect the desired value.

That's the fastest way, but my primary recommendation would be to get rid of your single select field on your Proposal object (table) schema.
In its place, create a new linked record field on your Opportunity object.
You'll have two linked record fields on your opportunities. Now designate one of the fields as the Primary Proposal and configure the field to only allow a single record at a time.
The second linked record field will be for all your secondary proposals.

One of the reasons why this would be my preferred approach is because it isolates control of the primary/secondary designation solely to how proposals are linked on an opportunity record
Using a rollup back on a proposal record, you'd then easily be able to get information about whether a proposal is designated as primary or secondary without having to jump to each proposal and manually change the status yourself.

Snag_1fa2cf97.png

  

Snag_1fa3054d.png

This also falls more along the lines of general best practices in terms of database design and it will save you on some tech debt, but just food for thought.

See Solution in Thread

2 Replies 2
Ben_Young1
11 - Venus
11 - Venus

Hey @jwag

This one is a bit of a doozy to explain, so bear with me.
There are a couple of ways to approach this.

To answer your question directly: Yes, there is a way to automate this.
From what you've described, it seems like you would create an automation that is triggered when a proposal record is updated to being the primary proposal.

They would execute a Find records action that would search for all proposal records that are linked to the original opportunity but are not the original proposal record that triggered the automation.
From there, you'd iterate through the found records and change the value of the single select field to reflect the desired value.

That's the fastest way, but my primary recommendation would be to get rid of your single select field on your Proposal object (table) schema.
In its place, create a new linked record field on your Opportunity object.
You'll have two linked record fields on your opportunities. Now designate one of the fields as the Primary Proposal and configure the field to only allow a single record at a time.
The second linked record field will be for all your secondary proposals.

One of the reasons why this would be my preferred approach is because it isolates control of the primary/secondary designation solely to how proposals are linked on an opportunity record
Using a rollup back on a proposal record, you'd then easily be able to get information about whether a proposal is designated as primary or secondary without having to jump to each proposal and manually change the status yourself.

Snag_1fa2cf97.png

  

Snag_1fa3054d.png

This also falls more along the lines of general best practices in terms of database design and it will save you on some tech debt, but just food for thought.

jwag
6 - Interface Innovator
6 - Interface Innovator

Hey @Ben_Young1 ,

Thank you so much for the thorough response! I admit I hadn't spotted the find function, but in the end I have gone with your idea of a second (primary) linked field, which is simpler and makes more sense.

Thanks again!