Copy FileAttachments
Summary
Copy FileAttachmentsContent
Hi All,
Copy FileAttachments from one record to another record in custom object below is the code its not working, can anyone advise please what is wrong with this code snippet.
Error:
Fatal error: Call to undefined method RightNow\Connect\v1_3\FileAttachmentArray::shareFile().
function sharefile(){
$transferShareRec = RNCPHP\LL\TmpShareholderChange::fetch(1529);//fetch FileAttachments
$updatefile = RNCPHP\LL\TmpShareholderChange::fetch(1531);
$updatefile->FileAttachments =new RNCPHP\FileAttachmentArray();
for($i=0;$i < count($transferShareRec->FileAttachments);$i++){
$fattach = $transferShareRec->FileAttachments[$i];
$updatefile->FileAttachments->shareFile($fattach);// update file attachments
}
$updatefile->save();
}
Regards,
Satheesh AS.
Tagged:
0