[Vtigercrm-developers] Create module

William Bejarano william.bejarano at ito-software.com
Fri Jun 15 15:14:42 PDT 2012


I will try to make the second point, but, do you know how do?



2012/6/15 William Bejarano <william.bejarano at ito-software.com>

> thanks for your help,
>
> One week ago, I created a module with tutorial help
> http://crmevolutivo.com/wiki/doku.php?id=vtlibrelated, this
> module(abstract) related a module item with many users
>
> my intention is create a 1:1 relation (a abstract of a user )with vtlib
> and install this modules in other places automatically, without configure
> each database, using only vtlib
>
>
>
> 2012/6/15 Adam Heinz <amh at metricwise.net>
>
>> Well, for the most part, you should be able to get by on the instructions
>> at
>>
>> https://wiki.vtiger.com/index.php/CreatingEntityModule
>>
>> The only problem that I see is your 1:1 user to module requirement.  It's
>> very easy to enforce that requirement at the database level with foreign
>> keys, but I'm not sure what the best way to do it in the application layer
>> will be.  The vTiger save endpoints are optimistic and not really designed
>> to handle exceptions from the database layer.  Notice the lack of any sort
>> of handling of the results of the save call in
>>
>>
>> http://trac.vtiger.com/cgi-bin/trac.cgi/browser/vtigercrm/branches/5.4.0/vtlib/ModuleDir/5.4.0/Save.php
>>
>> That said, here are some (bad?) ideas to get you thinking:
>>
>> 1. You could write a beforesave handler and manually do your referential
>> integrity checks there, but you'll have to handle redirecting the  page on
>> failure.
>>
>> 2. You could make the userid field read-only, and only allow creation of
>> new module entities from an aftersave handler when new users are created.
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
>
> --
> *William Bejarano*
> Ing. Sistemas
> www.ito-software.co
>
>


-- 
*William Bejarano*
Ing. Sistemas
www.ito-software.co
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20120615/4965594c/attachment.html 


More information about the vtigercrm-developers mailing list