Hi all,
As this was asked by most of my Blog Readers that how we can save attachments / files with respect to Navision Documents like Sales order or Purchase orders, Here is a post which list the steps for achieving the goal.
This post is based on request of +Jasmine Jennifer & +somasree kar.
I had Certain question when people ask for such customization as we have options to store Documents under Standard Product using links as Shown Below.
Or by Using a Addon Like Zetadoc which is specially developed for same.
But Customer have issues with method 1 when there is a change is server all the links need to mapped again.
So let's discuss how we can achieve to store our attachments within Navision 2013 R2.
After Reading So Many Articles on NAV Design Patterns, i thought to make a generic solution for attachment management.
1. We will Create a Table which will store all the attachments & will have all the functions to -
- Import Attachment.
- Export Attachment.
- Delete Attachment.
- Update Attachment.
The Design of Table is as shown below -
2. The Primary Key of the Table is of type RecordID.
RecordID Data Type - "This data type contains the table number and the primary key of a table."
Let's see how we can use the table to store the attachment from Windows Client.
3. Created Three Actions in Sales Order Page as Shown below -
4. The Following is the Code Written for Three Actions -
Where -
AttachmentManagment is a variable of the table created above.
AttachmentRecRef is a variable of type RecordRef.
AttachmentRecID is a variable of type RecordID.
Let's Execute These Functions in Windows client.
Import Attachment -
Export Attachment -
Delete Attachment -
Now What if i want same functionality on Customer Card Page. Just Copy the actions from Sales Order Page and Change the Table Name in all three functions and we are good to go as shown below.
Action in Customer Card -
Some File Formats may not support the Open Action from Export Attachment Window, but we can still use them by using Save Option.
Objects Related to post can be downloaded From SkyDrive.
Objects Related to post can be downloaded From Mibuso.
Objects can be imported in NAV 2013 R2 W1 Database Only. A New Table is required free at ID 50000.
Hope you find the article helpful.
Regards,
Saurav Dhyani
saurav-nav.blogspot.com
As this was asked by most of my Blog Readers that how we can save attachments / files with respect to Navision Documents like Sales order or Purchase orders, Here is a post which list the steps for achieving the goal.
This post is based on request of +Jasmine Jennifer & +somasree kar.
I had Certain question when people ask for such customization as we have options to store Documents under Standard Product using links as Shown Below.
Or by Using a Addon Like Zetadoc which is specially developed for same.
But Customer have issues with method 1 when there is a change is server all the links need to mapped again.
So let's discuss how we can achieve to store our attachments within Navision 2013 R2.
After Reading So Many Articles on NAV Design Patterns, i thought to make a generic solution for attachment management.
1. We will Create a Table which will store all the attachments & will have all the functions to -
- Import Attachment.
- Export Attachment.
- Delete Attachment.
- Update Attachment.
The Design of Table is as shown below -
2. The Primary Key of the Table is of type RecordID.
RecordID Data Type - "This data type contains the table number and the primary key of a table."
Let's see how we can use the table to store the attachment from Windows Client.
3. Created Three Actions in Sales Order Page as Shown below -
4. The Following is the Code Written for Three Actions -
Where -
AttachmentManagment is a variable of the table created above.
AttachmentRecRef is a variable of type RecordRef.
AttachmentRecID is a variable of type RecordID.
Let's Execute These Functions in Windows client.
Import Attachment -
Export Attachment -
Delete Attachment -
Now What if i want same functionality on Customer Card Page. Just Copy the actions from Sales Order Page and Change the Table Name in all three functions and we are good to go as shown below.
Action in Customer Card -
Some File Formats may not support the Open Action from Export Attachment Window, but we can still use them by using Save Option.
Objects Related to post can be downloaded From SkyDrive.
Objects Related to post can be downloaded From Mibuso.
Objects can be imported in NAV 2013 R2 W1 Database Only. A New Table is required free at ID 50000.
Hope you find the article helpful.
Regards,
Saurav Dhyani
saurav-nav.blogspot.com
Hello Saurav,
ReplyDeleteI think we have also to add some code in the new created table, in order to import, no? coz as i checked the same steps, it won't upload... unless if there is big difference between NAV 2013 and NAV 2013R2 ... I had tested the way on NAV 2013. could you please advise. thanks
Hi,
DeleteIf you download objects from Mibuso or Skydrive link in the article you will find objects in Text and Fob for NAV 2013 R2 (W1). You can compare these objects with standard NAV 2013 R2 W1 objects and then merge piece in your database. Custom Table already have code in attached Objects.
Is there is any code available for those functions which was defined in table?
ReplyDeleteHi,
DeleteThat should be in attached text and fob files.