Adding a new column type to the account Schedule

I have a client that would like to use Account Schedules to meet some of their reporting requirements. They are impressed by the way they can predefine reports that use specified GL accounts without having to enter all the accounts in a request form each time the report is run. However, the one problem is that all the column types on the column layout are monetary related - none allow the reporting of quantity figures for the entries Therefore, I’ve been messing about with the AccSchedManagement codeunit, trying to add a new column type of Net Quantity, which should work identically to the existing Net Change type but using the quantity instead of the amount. To this end, firstly I’ve added a flow field to the GL Account table (similar to the existing Net change field but using the entries quantity instead of amount) and shown the column on the Chart of the Accounts, and this works fine. Secondly, to display the information in the schedule I’ve added an appropriate condition to the case statement in the AccSchedManagement.SetGLAccColumnFilters function and created a new column layout using the new column type. It all seems to hang together apart from the displayed value is not that of the quantities as required. I presume this is because I’ve done nothing to calculate the value of the new flowfield but the problem is I can’t spot where in the codeunit it is calculating the existing Flowfields. Can anyone point me in the right direction please? Alternatively, please don’t hesitate to warn me if this is really something I shouldn’t be attempting!! Many thanks

You can change everything you want to the schedules. I’ve done everything from excel-like calculation to Item ledger entries and custimised entries. You just realy need to figure out how the codeunit works. Taking a quick look at the codeunit the values are calculated in the function CalcGLAcc. It is not done with CALCFIELDS but with CALCSUMS, because of the filtertypes. Good luck!

Hi Mark, Thanks for getting back to me. I had been looking at the CalcGLAcc function, but was looking for CALCFIELDS not CALCSUMS as you suggest. I will investigate again. Thanks for the reassurances. Happy New Year to all!

Hi Gary, as Marq says, you can do a lot with Account Schedules. BUT do it slowly. By that I mean try one thing at a time. And test each new function fully before moving on to the next one. Its very easy to change one wrong line of code, and all of a sudden the whole thing dies, and you have to go back. Before you start, set up a series of test case Schedules so you cna do consistant tests in between. Then if somethign goes wrong, you only have to take a small back step to get back to a working system. Althogh this would seem obvious in development like this, in Account Schedules, its just very easy to mess the whole thing up, with one wrong calcsums or a filter change in the wrong place.