Attachment

rss

Posted by frodo1967 - Apr 7 ’16 at 12:49

Hi

I want to run a function when a attachment is added, at the moment I have solved this by adding a new button to add attachment and at the same time running my "own function".

But there is a built in event I can use to detect when a attachment is added through the "standard" button in the form?

  • rostislav
    rostislav
    Moderator
    Member for: 4 years 6 months 15 days
    #1 by rostislav Apr 7 ’16 at 07:21

    Do this:

    oldOkAttach = OkAttach;
    OkAttach = function () {
    	console.log('my code');
    	oldOkAttach();
    }
    
  • frodo1967
    Member
    Member for: 5 years 2 months 1 day
    #2 by frodo1967 Feb 27 ’17 at 03:00

    Sorry was off for a loooong time.

    But I tried your code, allthough the text "my code" is written to the log i get the errror below and the attachment is not saved:

    "You must specify a non-blank value for file name.

     

Displaying 1 to 2 of 2 messages