[Vtigercrm-developers] vtiger_attachments vs vtiger_notes?

Vikas Jain vikas at vtiger.com
Tue Dec 2 07:03:15 GMT 2014


Alan,

vtiger_notes has document information, if it is related to a internal file
then its filelocationtype is set "I" which means internal. This document
will have a file relation stored in seattachmentsrel table, to get the
actual detail of file like name, path, size etc you need to look into
attachments table. If a Contact/Lead etc is related to a Document then we
store the info into senotes table, so you need to first query the senotes
table to get the related documents then join notes table with seattachments
and attachments table to get the file information. Let me know if this
helps.

On 1 December 2014 at 20:03, Alan Lord <alanslists at gmail.com> wrote:

> On 01/12/14 14:13, Lajeesh wrote:
>
>> Think vtiger_notes is the table for document module and
>> vtiger_attachments is for file attachments
>>
>
> Yes but both vtiger_notes and vtiger_attachments contain attachment data
> (filename, path etc...).
>
> It's quite confusing regarding the ids used and which tables are used
> under which circumstances; along with notes and attachments tables there
> are also the seattachmentsrel and senotesrel.
>
> It looks like senotesrel points to seattachmentsrel and thence to the
> original entity but I want someone to confirm the structure so I can
> reliably write a query to find all attachments for a bunch of Leads or
> Accounts for example.
>
> Al
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>



-- 
Regards
Vikas
Vtiger Team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141202/70189e75/attachment.html>


More information about the vtigercrm-developers mailing list