Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

programmatically attach documents running in batch mode

$
0
0

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;

 

 


Viewing all articles
Browse latest Browse all 73760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>