C# Code for adding rows to ERP Table

Chris, is that still relevant if you’re using the business objects to add the record?

        var poSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.POSvcContract>(Db);
		Erp.Tablesets.POTableset poTS = new Erp.Tablesets.POTableset();
		poSvc.GetByID(poNum);
		poSvc.GetNewPODetailAttch(ref poTS, poNum, poLine);
		var newPORow = poTS.PODetailAttch.FirstOrDefault();
		newPORow["Company"] = Session.CompanyID;
		newPORow["PONum"] = poNum;
		newPORow["POLine"] = poLine;
		newPORow["DrawingSeq"] = attachNum;
		newPORow["XFileRefNum"] = lastRef;
		newPORow["DrawDesc"] = fileDesc;
		newPORow["FileName"] = fileName;
		newPORow["DocTypeID"] = docTypeID;
		newPORow["RowMod"] = "A";
		poSvc.Update(ref poTS);

No sir, this is direct table access. It’s definitely better to use a BO if it’s available.

Try adding a new document manually with the trace on (and not a document that already exist in your database) and see if the trace shows that step.

Mark