我有个叫APTran的数据采集卡。我要确保已插入此DAC中的所有记录。
这是为了对照相应的POReceiptLine未计费数量审核我的APTran记录
foreach(APTran apTran in Base.Transactions.Select())
{
// determine the state of apTran (inserted, Deleted)
}发布于 2019-07-03 22:01:59
bool isInserted = cache.GetStatus(apTran) == PXEntryStatus.Inserted;
bool isDeleted = cache.GetStatus(apTran) == PXEntryStatus.Deleted;
bool isInsertedDeleted = cache.GetStatus(apTran) == PXEntryStatus.InsertedDeleted;InsertedDeleted是一种特例,在这种情况下,记录被插入到缓存中,但在持久化到数据库之前被删除。
我不知道有没有官方的方法来检查记录是否真的被插入到数据库中。我通常做的是检查其中一个数据库生成的字段的值。在插入到数据库中之前,它们将为null。
bool hasBeenPersisted = apTran.Tstamp != null;https://stackoverflow.com/questions/56871119
复制相似问题