SuiteCRM
SuiteCRM copied to clipboard
Global Search doesn't link properly one to many relationships
When having a global search result that contains a column from a one-to-many relationship, the link of the record is broken, it doesn't bring you anywhere. This is because the Id of the linked record isn't correct.
Issue
Global Search doesn't link properly one to many relationships columns.
Expected Behavior
It should like just fine
Actual Behavior
It gives and error when following the link.
Possible Fix
Fixing the returned ID in the file lib/Search/SearchResults.php
Steps to Reproduce
- Create a one-to-many relationship between Contacts and Accounts (where Contacts is the 1)
- In Studio, in the Accounts List View Edition, add the field Contacts in the Default fields
- Create an Account and assign a Contact to it (the relationship field should be in the EditView)
- Search for the Account using the Basic Search in Global Search
- Click in the column value that displays the related Contact.
- That link should bring you to the Contact, but instead it display that can't find the record.
Context
This can be troublesome when working with several relationships.
Your Environment
SuiteCRM Version used: Version 7.12.6 Browser name and version: Versión 100.0.4896.88 (Build oficial) (64 bit Environment name and version: MySQL, PHP 7 Operating System and version: Ubuntu 20.04