Hello,using the following code,i'm trying to add a document to a table; however i can not see anything added in document management.The code also doesn't give any errors, any ideas how to resolve it ?
DocuRef docuRef;
DocuActionArchive archive;
erm_OperationInstructions oprinst;
Name _name = "C:\\test.txt";
select firstOnly * from oprinst where oprinst.OperationId == 'OP0001002';
try
{
ttsBegin;
docuRef.clear();
docuRef.RefRecId = oprinst.RecId;
docuRef.RefTableId = tableNum(erm_OperationInstructions);
docuRef.RefCompanyId = curext();
docuRef.Name = "testfile";
docuRef.TypeId = 'FILE';
docuRef.insert();
archive = new DocuActionArchive();
archive.add(docuRef, _name);
ttsCommit;
}
catch(Exception::Error)
{
info(strfmt("%1",Exception::Error));
}
*This post is locked for comments
I have the same question (0)