SuiteCRM 7: How to create a custom field and ovveride field methods

Hello! I followed the instructions here (Creating a custom field type in SuiteCRM :: SuiteCRM Documentation) and I created a custom field.
The problem is that I cannot override the methods of the field.

My code creates a file upload field, importing modules/DynamicFields/templates/Fields/TemplateField.php,

But when I am saving in a module which uses my field, code always goes through SugarFieldImage class (which extends SugarFieldFile).

I presumed that somehow the main code reads files inside /custom/include/SugarFields/Fields/ but it doesn’t seem to work this way.

I created a new class, extending SugarFieldImage with the same methods, but the system still uses the SugarFieldImage methods, ignoring my code.

What do I have to do, to override the SugarFieldImage class with my own? Do I have to declare the new class somewhere?

It’s better if you provide specifics:

  • the full paths and names of files you created
  • their contents (especially the initial parts, what they include, which classes the declare or extend, which methods, etc)

Hi,

Please provide more details about he code you have done so far.
Post your code files along with their directory paths.