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

How to download custom object attachments?

Accepted answer
22
Views
2
Comments
edited Jun 7, 2022 1:20PM in General Technical Discussions 2 comments

Content

Hi,

What's the best way to download custom object attachments:

I am using the code in the codesnippet specifically.

Any advice? Is there no easier way to download attachments in custom objects?

Code Snippet

 public function downloadDocument($o,$a) {
        RNCPHP\ConnectAPI::getCurrentContext()->ApplicationContext = "Update";
        header("Location: https://Username12345:[email protected]/services/rest/connect/v1.3/my.documents/".$o."/FileAttachments/".$a."?download");
        exit;
    }

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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