Mar 06, 2023 11:31 AM
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
Solved! Go to Solution.
Mar 06, 2023 12:13 PM
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.
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.
Mar 06, 2023 12:13 PM
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.
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.
Mar 07, 2023 01:05 AM
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!