29.12.2007, 19:50 | #1 |
Участник
|
Ruslan Goncharov: How to add a document into AX programmically? (Document handling)
Источник: http://rusgon.blogspot.com/2007/12/h...t-into-ax.html
============== As a matter of fact it's pretty easy. Following lines allow you do this. X++: void saveIntoDocuRefTable() { DocuValue docuValue; DocuRef docuRef; Container cFile; BinData binData; DocuTypeId _docuTypeId = ...; ; binData = new BinData(); binData.loadFile(fileName); cFile = Docu::splitFileName(fileName); docuValue.fileName = conpeek(cFile,1); docuValue.path = conpeek(cFile,3); docuValue.fileType = conpeek(cFile,2); docuValue.File = binData.getData(); docuValue.insert(); docuRef.ValueRecId = docuValue.recId; docuRef.RefCompanyId = CurExt(); docuRef.RefTableId = tableNum(....); docuRef.RefRecId = .....; docuRef.TypeId = _docuTypeId; docuRef.Name = fileName; docuRef.Notes = ....; docuRef.insert(); WinApi::deleteFile(fileName); } Источник: http://rusgon.blogspot.com/2007/12/h...t-into-ax.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|