The general idea of modelling 1:N relationships (typical LEFT JOIN's) is with nested loops:
CLEAR(recordA);
CLEAR(SomeTotalOfRecordB);
recordA.SETCURRENTKEY("SomeField");
recordA.SETRANGE("SomeField", 'somevalue');
IF recordA.FIND('-') THEN REPEAT
CLEAR(recordB);
recordB.SETCURRENTKEY("recordA No.");
recordB.SETRANGE("recordA No.",recordA."No.");
if recordB.FIND('-') THEN REPEAT
SomeTotalOfRecordB += recordB."SomeAmountField";
UNTIL recordB.NEXT=0;
UNTIL recordA.NEXT=0;
Comments
Posting,Heading,Total,Begin-Total,End-Total
Did you mean zero? for Posting, or Heading? option feilds start at zero. and zero is for Posting.1 is heading.
and headings do not have any glentry.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
There are only postings for GLAccount."Account type"::Posting in the G/L Entry Table, but if it is the G/L Account table you mean?
Setrange is like a SELECT statement
So you want
GLAccount.SETRANGE("Account Type",GLAccount."Account type"::Posting);
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
He probably just wants to see the gl entries for Total GLaccounts only,
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
http://mibuso.com/dlinfo.asp?FileID=515