Skip to Content
0
Jul 23, 2019 at 12:05 PM

Using DI API I would like to add an attachment to OCRD / Business Partners

405 Views Last edit Jul 23, 2019 at 12:11 PM 2 rev

Hi everyone,

I am using SAP B1 DI API and am unable to enter attachments in OCRD.

I am using PHP COM to enter the data, and I'm able to enter the attachments on ATC1 and OACT, but I can't find a property or method to access in OCRD for me to enter it.

$atc = $this->vCmp->GetBusinessObject(221);
if($atc->GetByKey($o[24]) != true) {
  $atc->Lines->Add();
  $filename_arr = explode('.',$o[23]);
  $atc->Lines->FileName = $filename_arr[0];
  $atc->Lines->FileExtension = $filename_arr[1];
  $atc->Lines->SourcePath = "somepath";
  $atc->add();
  $this->oBP->AttachmentEntry = $o[24]; // <-- DOES NOT WORK
}

can someone please help me achieve this?

Thank you very much