Attache a file to Documents module via sugar bean

Hi All,

   

            This is a continuation of Link

$pdfId=create_guid();
   
$cmd="cp myfolder/".$this->bean->id.".pdf upload/".$pdfId;//send my file to the upload folder
exec($cmd);
   
$docbean = BeanFactory::newBean("Documents");
$docbean->name = $filename;
$docbean->document_revision_id=$pdfId;
$docbean->status_id="Active";
$docbean->save();

I have a file in a folder name myfolder.

Now i want to attach it to the documents module via sugar bean.

Can we do it using sugar bean.

Can any one throw some lights on it.

André Lopes Francesca Shiekh hats

Regards

Sidhu

Parents Reply Children