AnsweredAssumed Answered

Attache a file to Documents module via sugar bean

Question asked by sidhu sidhu on Sep 15, 2017
Latest reply on Sep 15, 2017 by sidhu sidhu

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

Outcomes