I recently managed, with your help, to list available real estate properties (a custom object) based on its linked Opportunity StageName
. Now I noticed that this method will eventually return false positives as some properties will be linked to both 'Closed Lost' and 'Reserved' Opportunities at the same time.
I think a better approach would be to have an 'is available' field on the custom object that gets updated every time a linked opportunity changes its StageName. Let's say the field starts as 'Yes' by default and when a liked opportunity is created with "Reserved" the Property.is_available
is changed to "No". Stages "Reserved","Under Contract","Closed Won" would trigger a "No" on Property.is_available
while Stages "Evaluating", "Verbal Acceptance" and "Closed Lost" would trigger a "Yes" on Property.is_available
.
Would this be the right approach? Is it possible?
It is similar to this question but the business model is quite different.
EDIT: I tried to accomplish this using workflows but if I start the workflow using Property as the object, it won't list any Opportunity field in the 'Run this rule if the' dropdown options:
If instead I start the workflow from the Opportunity object, I can manage to have the triggering criteria set...
...but then I can't reach fields on the Property__c custom object: