You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Copy FileAttachments

Received Response
45
Views
2
Comments
edited Jun 7, 2022 1:21PM in General Technical Discussions 2 comments

Summary

Copy FileAttachments

Content

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.

 

 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!