diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index eb83fb5e..21ac0692 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -80,6 +80,14 @@ namespace Volian.Controls.Library { if (_MyDocVersion.DocVersionAssociationCount > 0) { + // if the count variable is not consistent with the actual list count, + // do a refresh. There was a bug, B2012-040, that was not reproducable.. + // so this is an attempt to fix it. + if (_MyDocVersion.DocVersionAssociations.Count == 0) + { + _MyDocVersion.RefreshDocVersionAssociations(); + if (_MyDocVersion.DocVersionAssociations.Count == 0) return; + } MyROFSTLookup = _MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup; _MyRODbID = _MyDocVersion.DocVersionAssociations[0].MyROFst.RODbID; }