[Vtigercrm-developers] example does not work

Joe Bordes joe at tsolucio.com
Tue Nov 21 06:56:24 PST 2006


HI,

El mar, 21-11-2006 a las 15:19 +0100, gabor escribió:
> hi
> 
> > The second value of your insert is an empty string. It
> should be a
> > numeric value obtained from the function
> getUniqueID("vtiger_field").
> Actually it is enough if you issue this query in mysql. I
> have used this query in mysql and it always assigns a unique
> value there.

Yes, this is because the field is defined as an auto-increment. The
problem is that this procedure does NOT update the value in
vtiger_field_seq so any new module or maybe some patches are going to
get into trouble with overwritten field values. It's OK if your sure you
are never going to add anything somebody else has done.

The correct way to do this is launch the SQL insert and then modify the
value in vtiger_field_seq accordingly.

Joe
TSolucio
> 
> > 
> 
> > 
> > El mar, 21-11-2006 a las 00:14 +0100, mikozod hozza escribió:
> > > Hello,
> > > 
> > >  I would need help why the example at
> > >
> http://wiki.vtiger.com/index.php/Creating_New_Fields_in_Existing_Modules
> > > does not work for me.
> > > I have installed vTiger 5.2.0 on Linux box.
> > > I put this query:
> > > "insert into vtiger_field values( 4, '',
> > > 'event_time','vtiger_login_hist', 2, 5, 'event_time',
> > > 'Event', 0, 0, 0,100, 2, 5, 1, 'DT~O',  1,  0, 'BAS' );"
> > > vtiger_login_hist is my prop table., event_time is one of
> > > its field.
> 
> 
> ___________________________________________________________
> A legjobb AKCIÓS utazások oldala - Budavár Tours
> http://ad.adverticum.net/b/cl,1,6022,99401,161631/click.prm
> 
> 
> 
> _______________________________________________
> Reach hundreds of potential candidates - http://jobs.vtiger.com 




More information about the vtigercrm-developers mailing list