I have this code that loops through the GL Inquiry scroll window. I just happened to stumble across a recurring GL entry the is posted each month. The entries consists of 3 distribution lines. What makes each posting unique is the date and RecurringTrxSequence. So I pass all these values down and set the beginning and ending range but much to my surprise the loop goes through all 36 distributions crossing dates. I am using key 8 which matches these values. On the screen is only the three for each month. What am I missing to restrict it to just the three distributions for each date?
Microsoft.Dexterity.Applications.DynamicsDictionary.GlYtdTrxOpenTable GLDistTable;
GLDistTable = Dynamics.Tables.GlYtdTrxOpen;
GLDistTable.Key = 8;
GLDistTable.RangeClear();
GLDistTable.Clear();
GLDistTable.JournalEntry.Value = JournalNumber;
GLDistTable.OpenYear.Value = TrxYear;
GLDistTable.TrxDate.Value = TrxDate;
GLDistTable.RecurringTrxSequence.Value = RecurringTrxSequence;
GLDistTable.RangeStart();
GLDistTable.Fill();
GLDistTable.JournalEntry.Value = JournalNumber;
GLDistTable.OpenYear.Value = TrxYear;
GLDistTable.TrxDate.Value = TrxDate;
GLDistTable.RecurringTrxSequence.Value = RecurringTrxSequence;
GLDistTable.RangeEnd();
err = GLDistTable.GetFirst();
while (err != TableError.EndOfTable)
{
Do work
}