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

shareFile adding attachments to every thread item?

Received Response
20
Views
3
Comments
edited Jun 8, 2022 12:08PM in General Technical Discussions 3 comments

Content

I am developing a CPM that copies a number of fields from a parent incident to a child incident. I found the "shareFile" functionality, which is great for the attachments. It's working great, except that after the attachments have been copied, the child incident shows the attachments connected to every single thread item. (See attached picture.) If I look at the attachment tab, there are just the two attachments, so it's doing the right thing, except for how it appears to be attached to every thread item.

Here's the relevant code:

$incident->FileAttachments = new RNCPHP\FileAttachmentIncidentArray();
 
for ($i=0; $i < count($parentIncident->FileAttachments); $i++) { 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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