AnsweredAssumed Answered

Custom field type not calling its save method

Question asked by Artis Plocins on Mar 27, 2018
Latest reply on Apr 5, 2018 by André Lopes

I have created a custom field type just like here in the documentation, but the script under the section "Registering the Field Type" does not run the save method at all.

 

This cannot be worked around by a logic hook or field JS controller so simply because the JS controller does not track field changes (on model sync event) and the logic hook does not expose the custom field type in $arguments['dataChanges']['customField'].

 

I even tried adding a log message $GLOBALS['log']->fatal('SugarField save method test.') to the original save function in the core file include/SugarFields/Fields/Base/SugarFieldBase.php, but even that did not run as the message did not appear in the log.

Outcomes