[Vtigercrm-developers] This shouldn't be so hard!
Alan Lord (News)
alanslists at gmail.com
Mon Jun 11 09:13:46 PDT 2012
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
More information about the vtigercrm-developers
mailing list