Problem adding a custom Field to listview

Hi,

I notice there is a ‘Time’ field available in include/sugarfields/time, but for some reason this doesn’t appear as an option in studio, which only allows me to create a ‘DateTime’ field type.

I am trying to add a Time field with the following :-

custom\Extension\modules\AOS_Products\Ext\Vardefs_create_field_StartTime.php

<?php
	$dictionary['AOS_Products']['fields']['startTime'] = array(
    'name' => 'startTime',
    'vname' => 'LBL_STARTTIME',
    'type' => 'time',
    'studio' => true,
    'massupdate' => 0,    
	'importable' => 'true',
    'duplicate_merge' => 'disabled',
	'audited' => false,
	'reportable' => true,
    'unified_search' => false,
    'merge_filter' => 'disabled',
    'size' => '11',
    'help' => '',
	'dbType' => 'time',
    'comment' => 'Start time',
	);	

After running a quick repair the field is added to studio and i can change the values in Edit/Detail views.

However, for some reason the field will only save in the ‘hidden’ section of listview. It won’t save if i move it over to ‘available’ and ‘default’.

Am i missing something in the vardef?

After lots of trial an error, and the help of other posts, i managed to get the field to save in listview by using the following:

$dictionary['AOS_Products']['fields']['starttime'] = array(
'name' => 'starttime',
'vname' => 'LBL_STARTTIME',
'type' => 'time',	
'required' => false,
'reportable' => true, 

I think there were a couple of issues. Firstly, the problem persists if the fieldname contains a capital letter - so using ‘startTime’ in the above code does not work.

But i also found that the field list in studios listview behaves strangely. For example, the new field is listed sometimes, but only if you move another field and click save and deploy. Sometimes it will save in the available column, but if you try to save it in the default column it completely disappears from the list again. I’ve tried so many iterations, emptying cache and Ext folders and rebuilding each time… but cant find any consistency. Edit and detail views work perfectly all the time.

confusing to say the least :- :thinking: -