Thank You very much Sreenath, i think now i could make out some thing. sreenath reddy <[EMAIL PROTECTED]> wrote: Hello...
Tables involved: DocuParameters DocuRef DocuTable DocuTableEnabled DocuType DocuValue DocuField DocuOpenFile Steps Involved Goto MainMenu/Basic/Setup/DocumentManagement /Parameters/ Fill in the Archive directory with the path and the number sequence. Path gets stored in DocuParameter table numseq will be taken from numseq table. set the tables for which document handling is to be enabled in DocuTableEnabled form Goto MainMenu/Basic/Setup/DocumentManagement/ActiveDocumentTables. Data gets entered into the DocuTableEnabled table. DocuType contains the type of documents that can be handled . we can check the type of documets to be handled by Axapta. DocuValue contains the name of the file,type of the file and the path where the file is stored. DocuRef table contains the doucment id and the refrecid which can used to know the tablerecord id w.r.t to particular line in the table. DocuTable contains the type of document and templatefilename w.r.t to each type of document,file,note(etc) that axapta supports. Programatically i will give u the methods how to achive document handling in Axapta for a table - NumSeqReference method will generate number sequence for module 16 which helps for document handling in axapta str NumSeqReference() { ; select _numberSequenceReference where _numberSequenceReference.Module == 16; return _numberSequenceReference.NumberSequence; } filename method will create filename from the number sequence str filename() { numberseq numseq; ; select _numbersequenceReference where _numberSequenceReference.Module == 16 ; numseq = numberseq::newGetNumFromCode(_numberSequenceReference.NumberSequence,noyes::Yes); return numseq.num(); } Archive path method - which returns archive path str archivePath() { str filePath = DocuParameters::find().archivePath; if (! filePath) throw error("@SYS62843",'',SysInfoAction_formRun::newFormname(formstr(docuParameters), identifierstr(Archive_ArchivePath),"@SYS4157")); filePath = Docu::fileCheckPath(filePath); if (! winapi::pathExists(filePath)) throw error("@SYS62844",'',SysInfoAction_formRun::newFormname(formstr(docuParameters), identifierstr(Archive_ArchivePath),"@SYS4157")); select _numberSequenceReference; filePath = filePath + this.filename(); return filePath; } writeDocuValue method will create or writes into the tables the document to be created str writeDocuValue(str refRecId,TableName tableName,str fileType, str name) { DocuValue docuValue; DocuRef docuRef; Dictionary dict; str filePath; ; dict = new Dictionary(); docuValue.ttsbegin(); filePath = this.archivePath(); /*switch(fileType) { case 'DOC': filePath = filePath + '.DOC'; break; case 'TXT': filePath = filePath + '.txt'; break; } */ filePath += '.' + fileType; [docuValue.fileName, docuValue.fileType, docuValue.path] = Docu::splitFilename(filePath); //fileName); docuValue.Name = name; docuValue.insert(); docuValue.ttscommit(); docuRef.ttsbegin(); docuRef.ValueRecId = docuValue.RecId; docuRef.RefTableId = dict.tableName2Id(tableName); docuRef.RefRecId = str2int(refRecId); // switch(docuValue.FileType) // { // case 'DOC' : // docuRef.TypeId = 'Document'; // break; // // default : // docuRef.TypeId = 'File'; // break; // } docuRef.insert(); docuRef.ttscommit(); return filepath; } getDocuPath method will get the document path with file name and extension ---------------------------------------------------------- str getDocuPath(str strTableName,str strRefRecId) { DocuRef docuRef; DocuValue docuValue; Dictionary dict; TableName tableName; RecID refRecId; ; tableName = strTableName; refRecId = str2int(strRefRecId); dict = new Dictionary(); select docuRef where docuRef.RefTableId == dict.tableName2Id(tableName) && docuRef.RefRecId == refRecId && docuRef.TypeId!= "SPDocs"; if(docuRef.RecId > 0) select docuValue where docuValue.RecId == docuRef.ValueRecId; if(docuValue.FileName && docuValue.FileType ) { return docuValue.FileName +'.'+ docuValue.FileType; } else return ''; } vijay kishore raju <[EMAIL PROTECTED]> wrote: Hi everybody, I am a new member of this group, i've got problem, I got the task on customizing the document handling process, means i have to save the file in my predefined path and a record should be inserted into my Custom table I am not getting from where should i start, i was said to create a class which inherits the DocuAction or DocuArchive or what ever required, but this hint could not work out, can any body please suggest or guide me to resolve this issue, Thanks in advance. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed]