Where is the error in this code ? Why getting this error ?
try
{
RepositoryRegistration repositorio = new RepositoryRegistration("192.168.16.6", "ARQDIGITAL");
Session session = new Session();
session.LogIn("xxxxx", "xxxxx", repositorio);
foreach (var entry in listaPlanilha)
{
int docID = Document.Create("\\ARQDIGITAL\\014 GESTÃO ADMINISTRATIVA\\014.8 ADMINISTRAÇÃO DE MATERIAL E PATRIMÔNIO\\040.2 CONTROLE PATRIMONIAL\\" + entry.Local,
"DEFAULT", EntryNameOption.AutoRename, session);
DocumentInfo docInfo = (DocumentInfo)Entry.GetEntryInfo(docID, session);
docInfo.SetTemplate("ADM Gestão Patrimonial");
FieldValueCollection fvc = new FieldValueCollection();
fvc.Add("SEDE", entry.Sede);
fvc.Add("DATA AQUISICAO", entry.DataDeAquisicao);
fvc.Add("NF", entry.NF);
fvc.Add("VALOR DE COMPRA", entry.ValorDeCompra);
fvc.Add("DESCRICAO", entry.Descricao);
fvc.Add("FABRICANTE", entry.Fabricante);
fvc.Add("SEQ CONTROLE", entry.Etiqueta);
fvc.Add("Setor", entry.Local);
docInfo.SetFieldValues(fvc);
docInfo.Save();
Console.WriteLine("DOCUMENTO CRIADO NO REPOSITORIO: " + entry.Fabricante);
}
session.LogOut();
}
catch (Exception ex2)
{
FileStream fs1 = new FileStream(@"C:\Users\allan.freitas\Source\Workspaces\Laserfiche\LaserficheArqDigital\bin\Debug" + @"\ERRO_IMPORTACAO.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter sw1 = new StreamWriter(fs1);
sw1.BaseStream.Seek(0, SeekOrigin.End);
sw1.WriteLine("ERRO: escreveu as " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + "\n" + "{0} ", ex2);
sw1.Flush();
sw1.Close();
}
ERRO: escreveu as 29/04/2015 17:02
Laserfiche.RepositoryAccess.ObjectNotFoundException: Entry not found. [9001]
em Laserfiche.RepositoryAccess.Entry.MakeDocFolder(String path, String volumeName, EntryType entryType, String lockToken, EntryNameOption options, Session session)
em Laserfiche.RepositoryAccess.Document.Create(String documentPath, String volumeName, EntryNameOption options, Session session)
em LaserficheArqDigital.ExcelParaRepositorioArqDigital.Main(String[] args) na c:\Users\allan.freitas\Source\Workspaces\Laserfiche\LaserficheArqDigital\ExcelParaRepositorioArqDigital.cs:linha 87