cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Discover the updated GST rates in QuickBooks Online Singapore Find out more

Reply to message

View discussion in a popup

Replying to:
Ajit
Level 1

Upload Attachments to JournalEntry using PHP API

I am able to create a JournalEntry using PHP-API

I am also able to upload an attachment using PHP-API.

 

However the attachment is not getting linked to the JournalEntry, instead it is showing up in the UnLinked list.

 

$entityRef = new IPPReferenceType(array('value'=>'JE9999', 'type'=>'JournalEntry'));
$attachableRef = new IPPAttachableRef(array('EntityRef'=>$entityRef));
$objAttachable = new IPPAttachable();
$objAttachable->FileName = "testfile.jpg";
$objAttachable->AttachableRef = $attachableRef;
$resultObj = $GLOBALS['dataService']->Upload(base64_decode($imageBase64['attach']),$objAttachable->FileName,$sendMimeType,$objAttachable);
Solved