AnsweredAssumed Answered

Sugar 6.0.x - Custom field default values behavior issue

Question asked by Germán Gutierrez on Jul 27, 2016

Ive a custom field..   The field on the manifest is defined as , but since it can be also edited on the studio feature it moslty doesnt matter

 

    'custom_fields' => array (

         //Text

        array(

            'name' => 'edwards_id',

            'hidden' => true,

            'type' => 'varchar',

            'module' => 'admin_nc',

            'default_value' => null,

            'max_size' => 255,

            'required' => false, // true or false

            'reportable' => false, // true or false

            'audited' => false, // true or false

            'importable' => 'true', // 'true', 'false', 'required'

            'duplicate_merge' => false, // true or false

        ))

 

 

Go to studio , > your module > edit this field

 

img205.png

 

After saving default value on the fields_meta_data table is still Null for default value

img206.png

 

#JSYK This field is not added on the editView Layout

When i create a new record, the field gets saved as null on the db.   
but if you edit a record the field (which is not on the layout view) is saved on the db as "" (blank)

 

 

I cant seem to keep that value as null after editing a record, which is what im trying to achieve

Attachments

Outcomes