AnsweredAssumed Answered

How to add related fields to dashlet?

Question asked by derrickoltmann derrickoltmann on Nov 21, 2014
Latest reply on Apr 17, 2015 by Sumit Sahay
Running CE 6.5.18, it seems that when using the Module Builder and adding a 'relate' field to a dashlet with a link, the link populates with the ID of the module, instead of the ID of the fields relation. It displays the related information fine, but cannot link to it.

This is the modules .data.php the builder puts out:

'insowner' =>   array (
    'type' => 'relate',
    'studio' => 'visible',
    'label' => 'LBL_INSOWNER',
    'id' => 'VEND_VENDOR_ID_C',
    'link' => true,
    'width' => '10%',
    'default' => true,
    'name' => 'insowner',
  ),

The "Vendor" column holds the link, notice the record at the bottom.


Clicking on this link results in an error of: "Error retrieving record. This record may be deleted or you may not be authorized to view it."



I have discovered through hours of trial and error, that if I add another column which contains the key, and is visible, the link works fine. (compare photo below) If the column containing the ID is hidden, the link breaks and points to the wrong ID / record again.

Working code:

'insowner' =>   array (
    'width' => '10%',
    'label' => 'LBL_INSOWNER',
    'link' => true,
    'default' => true,
    'name' => 'insowner',
  ),
'vend_vendor_id_c' => 
  array (
    'type' => 'relate',
    'studio' => 'visible',
    'width' => '1',
'label' => 'Vendor ID',
'link' => true,
    'id' => 'VEND_VENDOR_ID_C',
    'default' => true,
  ),




Any Idea what I (and/or the Module Builder) am doing wrong here?

I'd really like the ability for this to work without having to display the ID...

Thank you!

Outcomes