![]() |
Getting Related Item Information |
Post Reply
|
| Author | |
Daniel
Admin Group
Technical Director Joined: 19 Dec 2006 Location: Stoke-on-Trent Posts: 875 |
Post Options
Quote Reply
Topic: Getting Related Item InformationPosted: 13 Jun 2012 at 10:13am |
|
If you want to extract information about where your related items have been saved to, you can use a script like this after your save action has executed:
|
|
|
Daniel Tallentire
Support Parker Software |
|
![]() |
|
MarcPryde
New User
Joined: 02 Aug 2012 Posts: 3 |
Post Options
Quote Reply
Posted: 14 Aug 2012 at 12:10am |
|
Using the info given, I modified the original scripting example to work. Below is a customized code snippet for the Attachments table used locally. Thank you for the help.
A couple of notes that I was curious about.
[1] .Size appears to return 0 bytes and therefore, I was unable to leave in the original If Len(attachment)>0 then statement.
[2] .SaveTo appears to be empty and I substituted this for Location which is filled in.
Any clarity that you can bring to these two notes is appreciated.
For A=1 To Email2DBMessage.RelatedItems.Count
Attachments.AddNew Attachments.Fields("Attachment_Issue")= FIELDS_Value("WorkOrderID")
Attachments.Fields("Filename")=Email2DBMessage.RelatedItems(A).Name Set myStream = New ADODB.Stream file_ext = Email2DBMessage.RelatedItems(A).FileExtension Next A |
|
![]() |
|
Liam
Admin Group
Joined: 29 Jun 2011 Location: Stoke-on-Trent Posts: 144 |
Post Options
Quote Reply
Posted: 05 Oct 2012 at 6:57am |
|
Hello MarcPryde,
1. The size property doesn't seem to work correctly for content type image at the moment, I have reported this to the developers who will take a look further look into this. This does appear to work correctly for other content types. 2. the SaveTo does seem to work from my tests. This would only contain data if you have a Process Attachments action which has "Include Inline Attachments" checked and this Process Attachments action was processed before the Run An Email2DB Script item.
|
|
![]() |
|
James Horton
Admin Group
Technical Support Joined: 01 Jun 2009 Location: Stoke-on-Trent Posts: 277 |
Post Options
Quote Reply
Posted: 21 Dec 2012 at 9:36am |
|
I am un-sure if this was confirmed else where but the Content Type now functions as required in this area.
Thank you, James
Edited by James Horton - 03 Jan 2013 at 10:49am |
|
|
Best Regards,
James Horton Technical Analyst Parker Software |
|
![]() |
|
James Horton
Admin Group
Technical Support Joined: 01 Jun 2009 Location: Stoke-on-Trent Posts: 277 |
Post Options
Quote Reply
Posted: 03 Jan 2013 at 10:16am |
|
Here is a break down of each of the RelatedItems(COUNT).
properties:
ContentType This will be the content type delcarations, such as what would be seen within the MIME text for the file e.g. image/jpg Data This contains the raw byte data for the item selected. FileExtension Extension type such as gif. FileNameWithoutExtension File name minus the extension type. IsAttachedMessage Boolean to represent whether it is an attached email message. IsRelatedItem Boolean to represent whether it is a related item or not. Location Temporary storage location for the attachment while processing. Used to save to a perminant directory. Name Full file name of the item RelatedContentID This is the ID of the content item within the message e.g. image001.gif@01CDE993.D8564850 RenameTo Optional variable for you to set during the process so that it takes on another name. SavedTo Optional variable for you to set during the process so that it is saved to a particular directory. Size File size of the item quoted in bytes. Edited by James Horton - 03 Jan 2013 at 10:17am |
|
|
Best Regards,
James Horton Technical Analyst Parker Software |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |