Hi All,
My goal is to create functionality which takes all files from specified directory and attaches in AX (document handling).
Does anybody has experience working with DocuActionArchive class? That class could be used for attaching documents and it works fine.
However it doesnt work in bach mode, because of specific run-on-client classes (example.: DocuActionArchive.add() contains Winapi class).
Of course I can override or write new method specialy for server run-on, but is it only one option?
Any suggestions?
Below is my code:
ttsBegin;
docuRef.clear();
docuRef.RefRecId = _refRecId;
docuRef.RefTableId = _refTableId;
docuRef.RefCompanyId = _refCompanyId;
docuRef.Name = name;
docuRef.TypeId = typeId;
docuRef.insert();
archive = new DocuActionArchive();
archive.add(docuRef, _name);
ttsCommit;