Hello Tracker Support,
Item 1:
Is there a way to ask the control if a document has any attachments? The reason for this is that the attachment indicator is on the 'Document Options' toolbar which we have disabled for other reasons.
Item 2:
When the viewer control property READONLY=TRUE:
a-Should the Add Attachment button be disabled? (It does ignore the click which is good.)
b-You should not be able to delete attachments but you can.
Thanks.
Is there a way to ask the control if document has attachment
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
- Ivan - Tracker Software
- Site Admin
- Posts: 3549
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Is there a way to ask the control if document has attach
to check if document has embedded files (not via file attachment annotations), you can use the following javascript code
which will return the number of embedded files in the document.
Code: Select all
this.dataObjects.length
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Is there a way to ask the control if document has attach
Code sample (pseudocode):Item 1:
Is there a way to ask the control if a document has any attachments?
Code: Select all
variant dataInStub;
variant attachmentsCount;
pdfViewer.DoDocumentVerb(docId, "", "GetAttachmentsCount", dataInStub, out attachmentsCount, PXCVA_Sync);
boolean docHasAttachments = (attachmentsCount != 0);
a - yesItem 2:
When the viewer control property READONLY=TRUE:
a-Should the Add Attachment button be disabled? (It does ignore the click which is good.)
b-You should not be able to delete attachments but you can.
b - it is bug
We will check and fix these bugs. Please wait for next build. Thanks.
Best
Regards.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.