Details
- 
    Type:
Bug
 - 
    Status: Done/Fixed
 - 
    Priority:
Minor
 - 
    Resolution: Fixed/Completed
 - 
    Affects Version/s: 4.7.19
 - 
    Fix Version/s: 5.0.0
 - 
    Component/s: Core CiviCRM
 - 
    Labels:
 
- 
        Versioning Impact:Patch (backwards-compatible bug fixes)
 - 
        Documentation Required?:None
 - 
        Funding Source:Contributed Code
 - 
        Verified?:Yes
 - 
        Overview:Patch to correct incorrect behaviour of functions underlying the Custom record View pop-up affecting file attachments.
 - 
        How it works currently:
 - 
        How it should work:Step 3 in Description: The file link should be to the correct file.
 - 
        Acceptance Criteria:Custom record View pop-up displays correct file's link regardless of number of records with attached files per contact.
 
Description
Steps to reproduce:
- Create a custom field set with a file field and another field e.g. integer, and set to allow multiple records and display as tab with table. (Note: you need the second field because if the custom field set only contains a file field then when a record is added an error is given, "One of parameters (value: -0) is not of the type Integer".)
 - Add at least two records of this new type to a contact, with a different file attached to each record.
 - View (not Edit) the second record and the file link dispplayed will be for the first record's file and not this record's.
 
Editing the record gives the correct file link; it's only View that has the problem.


Tested on the 4.7.19 release and also confirmed on dmaster.