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

FileAttachments and Prev

Received Response
28
Views
1
Comments
edited Jun 8, 2022 12:03PM in General Technical Discussions 1 comment

Content

Hi all,

Im trying to write a Custom Process script on Incident Update to trap if an attachment has been added to the Incident. It works fine on Create as I can check attachment count as below.

    $files = $obj->FileAttachments;
    $count = count($files);

However, when I try to get the previous incident on Update and get an attachment count, it always comes back as 0.

    $objOld = $obj->prev;
    $filesOld = $objOld->FileAttachments;
    $countOld = count($filesOld);

Any suggestions?

Cheers,

Mark

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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