5 Replies Latest reply on Aug 30, 2017 11:10 AM by dcogny

    Adding a note / journal entry when there is a new attachment

    jeffnohl Apprentice

      Hello Ivanti users

       

      Is it possible to add a note to an incident (right now just looking at incident) when a new attachment is added to that incident?

      The end aim would be that there is something in activity history which states the name of the file, time, and who uploaded it to provide context.

       

      I can get the link for IncidentContainsAttachment into a triggered action, but not sure how to pull the attachment details into the note.

       

      Thanks in advance for any pointers.

        • 1. Re: Adding a note / journal entry when there is a new attachment
          dcogny Expert

          Hi Jeff,

           

          Let's do this!

           

          • Create "AttachmentName", "AttachmentDAte" and "AttachmentUploader" fields in your Incident Object, making sure they match the characteristics from the original field in "Attachment" (Unicode 255 for example). By the way, I made the whole example with the fields that you wanted to add, but you can add as many as you want, as long as the attachment gets the information it can be transferred to the Incident. Also, I added the field "AttachmentDate", but as you will see at the end, the note gets created instants after the attachment gets uploaded, so it might not me necessary to ad the field itself, but, as you prefer:

          • Then, push the information from the attachment into those fields in "Incident""

          • Create a "Triggered Actions" Business Rule in the Incident Object with the following configuration:

            • Press "Next" and select "Configure New Action" and choose "Insert Child Object":

            • Press "Next" again, select "IncidentContainsJournal:Journal#Notes" as "Child Object Type" and fill the information as you can see in the next screenshot (too much to write... ), of course, keep in mind that those are the minimal fields that I think you should fill, is up to you to play around (Maybe add "true" to "Publish to Web" if you want your customers to know about it, whatever you need...):

            • The "Notes" field is what will be in the body of the Note, so I think that it is the right place to add the information (but you maybe prefer to add the Uploader to the "Subject": $("New Attachment by " + AttachmentUploader))
          • And this is the result, I uploaded a picture that I had on my desk (showing the location of a cleaning cloth that MFD have to clean the scanner glasses), and this note was added right away:

           

          Hope this helps!

           

          Daniel.

          1 of 1 people found this helpful
          • 2. Re: Adding a note / journal entry when there is a new attachment
            jeffnohl Apprentice

            Thanks Daniel. It works brilliantly for a single attachment.

            Unfortunately when loading multiple attachments at once through the "Attachments" control type, I get multiple memos with the same attachment name.. But otherwise works brilliantly!

             

            Thank you very much for your help.

            • 3. Re: Adding a note / journal entry when there is a new attachment
              DrizztLU Apprentice

              Hi Jeffnohl,

               

              I might have another solution:

               

              Get on Attachment object, and add a triggered action (On link an incident)

                  

               

              Then create a Insert Object action (Inserting a Journal.Notes)

                  

               

               

              From here you can populate the note as you want with the attachment fields (to link the note to your incident the ParentLink will do the trick)

               

               

               

               

              Let me know if you want more details on anything (I'll try to answer as soon as I have a moment)

               

              Best Regards,

              Dylan

              • 4. Re: Adding a note / journal entry when there is a new attachment
                jeffnohl Apprentice

                Hi Dylan

                Brilliant. This works very well, and fixes the issue with multiple attachments occurring at once.

                 

                Between you and Daniel, I am slowly getting my head around linking objects.

                • 5. Re: Adding a note / journal entry when there is a new attachment
                  dcogny Expert

                  Thank you Drizzt, your solution is cleaner and does not need the extra fields on Incident (and will work at once for all the objects) .