It's all about the answers!

Ask a question

Check if attachment is null in javascript

Chen Ben ezra (41125) | asked Dec 10 '15, 5:44 a.m.
edited Dec 10 '15, 7:01 a.m. by Ralph Schoon (62.0k33643)

 Hi , 


I created a new workitem.

In the editor presentation i defined attachments under the tab links , the attachment ID is:

I want to create a java script  that will check if the attachment is null or contain any value (I don't care which value it contain).

Is it possible ? (According to of-a-work-item-in-a-customized-attribute ,  you can't access the attachments collection from JavaScript)

If it's possible in java script , how can i do it ? 




Accepted answer

permanent link
Ralph Schoon (62.0k33643) | answered Dec 10 '15, 5:56 a.m.
For all I know you can not access attachments in JavaScript. Carefully read the description of what data you can access in JavaScript. You basically have access to specific work item attributes and attachments are not an attribute, really.
Chen Ben ezra selected this answer as the correct answer

Chen Ben ezra commented Dec 10 '15, 5:59 a.m. | edited Dec 10 '15, 8:40 a.m.

Thanks :)

Your answer

Register or to post your answer.