[Vtigercrm-developers] This shouldn't be so hard!

Prasad prasad at vtiger.com
Mon Jun 11 11:55:03 PDT 2012


Alan,

Document attachment is handled like adding Related Record
to the module. This provides the ability to re-use existing documents
or have more than one attachment for a record.

You can try setting up a relation between your custom module and Document
(setRelatedList)

Regards,
Prasad

On Mon, Jun 11, 2012 at 9:43 PM, Alan Lord (News) <alanslists at gmail.com>wrote:

> On 11/06/12 14:42, Prasad wrote:
> > Alan,
> >
> > File attachement was a controlled operation and needs to be enabled by
> > module.
> >
> > Generally, MODULENAME->save_module() should trigger the call to
> > CRMEntity->uploadAndSaveFile($id,$module,$files);
> >
> > Look at modules/HelpDesk/HelpDesk.php
>
> Thanks for the reply Prasad,
>
> I'd already tried using the code from the Product module (as that has a
> specific attachment field for images) but trying any of the available UI
> types (including 69) for an attachment didn't work.
>
> I've swapped in the code from HelpDesk.php but this doesn't seem to be
> any more helpful and there isn't a field on the Trouble Ticket to add an
> attachment directly anyway.
>
> Anyway I did a quick test with a UI Type 61 and the code from the
> HelpDesk module... The save_module() and subsequent
> insertIntoAttachment() functions are activating ok, but the $_FILE
> superglobal always seems to be empty. I can save attachments in the
> Document module so why can't I do it from here???
>
> TIA
>
> Al
>
> --
> Libertus Solutions
> http://www.libertus.co.uk
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20120612/41fd0ce1/attachment.html 


More information about the vtigercrm-developers mailing list