It turns out that Sugar does not enforce 1:1 relationships, it overwrites them with no warning to the user. (Bug?)
Is my only option for enforcement a custom before-relationship-add logic hook?
Thanks,
Francesca
It turns out that Sugar does not enforce 1:1 relationships, it overwrites them with no warning to the user. (Bug?)
Is my only option for enforcement a custom before-relationship-add logic hook?
Thanks,
Francesca
Hi Francesca Shiekh,
The first answer comes to my mind is the logic hook as you mentioned. However, It would be good to know your use case.
Tevfik Tümer
Sr. Developer Support Engineer
Hi Francesca Shiekh,
The first answer comes to my mind is the logic hook as you mentioned. However, It would be good to know your use case.
Tevfik Tümer
Sr. Developer Support Engineer
Thank you Tevfik Tümer ,
we have a 1:1 between Quotes and Cases.
Cases are created to let our CS team know that the order is ready to enter.
Our Sales team creates a Case to process an Order in our ERP system for a given a Quote, and attaches the customer PO to the Case, they link the Case to the Quote.
We want to make sure that there is only one Case per Quote and only one Quote per Case, and if someone tries to enter a second Case for that same quote, or a second Quote for the same Case, we want to stop them from doing so and alert them to the fact that there is already a Case for that Quote.
I added a 1:1 Cases-Quotes.
Example of the non enforcement:
CaseA, relate to QuoteA => The related CaseA shows on the QuoteA, the related QuoteA shows on the CaseA
CaseB relate to QuoteA => CaseB shows QuoteA, QuoteA shows CaseB, CaseA has lost the relationship and is left without a related Quote and there was no warning that the relationship between CaseA and QuoteA was being removed.
To me, that's a big problem as other Sugar customers in similar scenarios may be losing data.
The logical expectation of a 1:1 is that it would be enforced by the code with a warning that proceeding will destroy the previously exising relationship.
Thank you,
Francesca