Fix #9680 - The related record selected from subpanel edit view is not updated #10638
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #9680
We closed the #9779 PR addressing this issue after identifying that the relationships in the Activities subpanel were not updating correctly in certain scenarios. To address this, we have refined and improved the solution, which is now presented in this new pill request.
Description
Assign the record indicated in the subpanel form instead of the main record (record from which the subpanel was opened) as they may be different.
We handle the two types of relationships that we have identified as failing so far:
We have created this code at the end of the function
set_relationship_info()
, although due to the fact that we are not experts in the core of SuiteCRM and the existing complexity in relationship management, we have the doubt if the proposed code can be more efficient in another part of the function or of SuiteCRM codeMotivation and Context
Failure to update related field causes data inconsistencies
How To Test This
Types of changes
Final checklist