protected OAdEntity GetCurrentRecord() { OAdEntity entity = null; do { try { TraceManager.TraceInformation( "DEBUG: GetCurrentRecord dbid : {0}", m_resultSetDbIds[m_currResultSetDbIdIndex]); entity = CQWrapper.GetEntityByDbId( m_userSession, m_recordFilter.RecordType, m_resultSetDbIds[m_currResultSetDbIdIndex]); } catch (Exception ex) { if (m_currResultSetDbIdIndex < m_resultSetDbIds.Length) { TraceManager.TraceInformation( "Failed to get the current record {0}, {1}", m_resultSetDbIds[m_currResultSetDbIdIndex], ex.Message); MoveNext(); } else { break; } } } while (entity == null); return(entity); }