SuiteCRM icon indicating copy to clipboard operation
SuiteCRM copied to clipboard

Global Search doesn't link properly one to many relationships

Open SinergiaCRM opened this issue 2 years ago • 0 comments

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. contactrelsearch

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

  1. Create a one-to-many relationship between Contacts and Accounts (where Contacts is the 1)
  2. In Studio, in the Accounts List View Edition, add the field Contacts in the Default fields
  3. Create an Account and assign a Contact to it (the relationship field should be in the EditView)
  4. Search for the Account using the Basic Search in Global Search
  5. Click in the column value that displays the related Contact.
  6. 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

SinergiaCRM avatar Aug 02 '22 15:08 SinergiaCRM