How to make these changes upgrade safe?

Hi!

I’ve made some cuostomizations on SuiteCRM, including extra fields on Opportunities_contacts relationship subpanel (Contacts under Opportunities). This is a very special entity, it does not behave like to regular modules (like Accounts or Oppotunities)

I included 1 DropDown field and one text field. The changes work like a charm, but I know they are not upgrade safe. Can anyone give me some advice on how to make them upgrade safe? I list below all the changes.

(how to add extra fields to this relationship is a recurring topic in this forum, so it is going to help others as well)

(the fields names are role_status and role_motivation)

in /modules/Contacts

  • ContactOpportunityRelationshipEdit.php
  • ContactOpportunityRelationshipEdit.html (added the fields so they can be edited)
  • ContactOpportunityRelationship.php
  • Contact.php
  • vardefs.php

in /Contact/language

  • en_us.lang.php
  • pt_BR.lang.php

in /metadata

  • opportunities_contactsMetaData.php

If you need to take a look, the files are attached.

A print screen from the subpanel working is attached as well - the colors come from a logic hook upgrade safe.

Thanks in advance,

Marcio

The basic mechanism is explained here

https://pgorod.github.io/Custom-folder/

Easy for language. And about the rest? The metadata, the HTML for editting the custom fields?

Thanks for your response, but I am pretty much in the same situation, still need help - remember, it is not a module, it is a special kind of subpanel witch generates a table of its own.

Marcio.

The mechanism is not just for language, it is for many other files. I would even say it’s for the majority of files in SuiteCRM.

So you can start just by moving your files to custom and check if they are being picked up by SuiteCRM.

In the Developer Guide, which you can find in the online Documentation, there are specific instructions about how to customize views and other elements. You should read also about the Extension mechanism.

https://docs.suitecrm.com/developer/extension-framework/

I don’t think your initial approach was very good - customizing in the core files, and then try to make them upgrade-safe. It’s best to start in the right place, learning how to make upgrade-safe customizations…

The mechanism is not just for language, it is for many other files. I would even say it’s for the majority of files in SuiteCRM.

So you can start just by moving your files to custom and check if they are being picked up by SuiteCRM.

In the Developer Guide, which you can find in the online Documentation, there are specific instructions about how to customize views and other elements. You should read also about the Extension mechanism.

https://docs.suitecrm.com/developer/extension-framework/

I don’t think your initial approach was very good - customizing in the core files, and then try to make them upgrade-safe. It’s best to start in the right place, learning how to make upgrade-safe customizations…