Can you Change the Widget Class for a Field Without having to Hand Edit the PHP

I have been working in Module Builder to create some Custom Modules. In several cases I have One to Many relationships and am using Sub-Panels. In order to make the SubPanel records clickable I have been following the online instructions here which say to manually edit the PHP file to add the following line of code:

'widget_class' => 'SubPanelDetailViewLink'

This works, but is not very convenient because it gets stripped off each time you load the project into Module Builder via Module Loader and then Re-Export.

Has anyone come across a more sophisticated answer that would avoid the problem of having to merge these changes back in each time you Export from Module Builder? I was thinking that there might be a way to do it via a logic hook using the process_record event.

What is weird (in my opinion) is that if you use the OOB Name Field, that Field is link able to the Detail View from a regular ListView, but for some reason it appears to be behaving differently in a Sub Panel.

I am using SuiteCRM 7.2.4

It looks like the behavior is related to Name fields having empty values. From what I can tell, the regular List View will render an empty Name field with a clickable space even if the value isn’t populated. Looks like the Sub-Panel behaves slightly differently in that it doesn’t render a link when the field is empty.

I think what I am going to do is just write a logic hook to populate the Name Fields based on the value of the actual identifying field. That way in the Lists I can have the benefits of the Name field but use other types of controls on the Edit form for data entry.