When adding attachments via a user interface:
Add button Click event below:
var myDoc = event.target;
var sFile = "myFile" + NumericField1.rawValue;
myDoc.importDataObject({cName: sFile});
var myDataObject = myDoc.getDataObject(sFile);
var sFileName = myDataObject.path;
ListBox1.addItem(sFileName,sFile);
the files are added and you can see them in the side bar. if I remove files from the UI it goes away from the sidebar.
QUESTION:
what is the event that triggers the removal of a file from a sidebar?
I can see the form brings a pop up alert but after i say "yes" it goes away from the sidebar and that is correct. I need to be able to capture that event so that i can deleted from the list on the UI
I assume that this event should exist so that i can catch it in the javascript code of the form and manipulate the UI accordingly. right?
thank you
Views
Replies
Total Likes
There's no event fired when an attachment is added or deleted over the UI.
You already using the getDataObject() method. Once you've deleted an attachment you need to recall it and refresh your list box.
@radzmar yes that is exactly what i am doing from the "remove file" button on the click event i use the getDataObject to refresh the list box.
"if I remove files from the UI it goes away from the sidebar."
the questions remains. Is there a way to capture the event thrown from the sidebar delete button? as you can see on the last two pictures it throws a pop up and then deletes the file but I have not found a way to capture the event so that i can code the listbox refresh.
There's no event fired when an attachment is added or deleted over the UI.
Views
Likes
Replies