[Vtigercrm-developers] Multiple autonumbering in same Module

Adrián Granado - Refineria Web adrian at refineriaweb.com
Tue Jan 15 23:11:55 PST 2013


Finally I did the worst solution I could do, I think:

I needed to have more than one autonumbering, depends on one checkbox:

 

global $adb;

if($_REQUEST['mode'] != 'edit')

{   

    if($_REQUEST['cf_640'] == 'on')

    {

        $sql = 'UPDATE vtiger_modentity_num SET active = 1 WHERE num_id =
25';

        $adb->query($sql);

        

        $sql = 'UPDATE vtiger_modentity_num SET active = 0 WHERE num_id =
24';

        $adb->query($sql);

    }

}

 

$focus->save("Invoice");

 

if($_REQUEST['mode'] != 'edit')

{   

    if($_REQUEST['cf_640'] == 'on') 

    {

        $sql = 'UPDATE vtiger_modentity_num SET active = 1 WHERE num_id =
24';

        $adb->query($sql);

        

        $sql = 'UPDATE vtiger_modentity_num SET active = 0 WHERE num_id =
25';

        $adb->query($sql);

    }

}

 

Maybe the user cant change the autonumbering via GUI but no problem, they
won’t do ;)

Thanks for you answers.

 

De: vtigercrm-developers-bounces at lists.vtigercrm.com
[mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] En nombre de MAGGI
Conrado RE-INGENIA
Enviado el: viernes, 11 de enero de 2013 17:37
Para: vtigercrm-developers at lists.vtigercrm.com
Asunto: Re: [Vtigercrm-developers] Multiple autonumbering in same Module

 

Hi,

One way would be create a custom workflow that update that field. That way
you can check for any condition you want before update.

Regards,



 

On 01/11/2013 01:28 PM, Adrián Granado - Refineria Web wrote:

Hello all Community,

 

I think this is so impossible but maybe someone did  or have experienced
something with this:

 

I have a simple autonumbering in one of my Modules. So I need another
autonumbering just increasing when I want (maybe when the user checks a
checkbox for example).

 

How can I do this? Just doing another field with uitype 4?

Thanks all.

 






_______________________________________________
http://www.vtiger.com/

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130116/5515cde1/attachment.html 


More information about the vtigercrm-developers mailing list