Alan,<div><br></div><div>File attachement was a controlled operation and needs to be enabled by module.</div><div><br></div><div><div>Generally, MODULENAME->save_module() should trigger the call to </div><div>CRMEntity->uploadAndSaveFile($id,$module,$files);</div>
<div><br></div><div>Look at modules/HelpDesk/HelpDesk.php</div><div><br></div><div>Let us know if it helps.</div><div><br>
Regards,</div><div>Prasad<br><br><div class="gmail_quote">On Mon, Jun 11, 2012 at 6:11 PM, Alan Lord (News) <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm creating a new module for a client using vtlib.<br>
<br>
We need to have a field in that module that will allow a user to attach<br>
an image or other file.<br>
<br>
There seem to be several possible UI types, 27/28, 61, 69, 105 & 107,<br>
none of which work in my tests.<br>
<br>
I also tried creating a UI type 10 field and<br>
setRelatedModules(array('Documents')) so the user could instead select a<br>
specific attachment already created and saved in the Document module,<br>
but this doesn't work either. The popup allows me to select the document<br>
but on save the field is always empty and nothing is being stored in the<br>
new modules database.<br>
<br>
The forums are littered with requests with this functionality but no<br>
conclusive answers...<br>
<br>
What is the right way to do what I, and many others, need?<br>
<br>
Thanks in advance<br>
<span class="HOEnZb"><font color="#888888"><br>
Al<br>
<br>
--<br>
Libertus Solutions<br>
<a href="http://www.libertus.co.uk" target="_blank">http://www.libertus.co.uk</a><br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</font></span></blockquote></div><br></div></div>