Average Days To Pay Calculation – History & Open (SQL Script)


In my previous post, Average Days to Pay Calculation (SQL Code), I had provided a SQL stored procedure that calculates a customer’s ADTP for a given point of time (between two dates). While this was perfect, it does not include fully applied but open invoices.

Some of the readers (particularly Tim and Steve Pena) requested to amend the script to consider open invoices that are fully applied. An invoice remains open even after fully applied only when we do not run paid transaction removal (PTR). I wanted to work on this script as soon as possible, but somehow I could not.

Better late than never, isn’t it?

Please find the link below to download the SQL procedure that calculates a customer’s ADTP for a given point of time, but looks at both history (RM30101) and open (RM20101) tables, take invoices that satisfy following criteria:

  • Invoices that are fully applied.
    • If invoices are in history table, by default, current transaction amount would be zero.
    • If invoices are in open table, then take those invoices whose receivable outstanding amount is zero.
  • Invoices that are not voided.
  • Invoices that have a document amount, meaning non-zero.

I have verified this script against some sample customers for whom, invoices were either in history (RM30101) or in open (RM20101) or in both.

As always, feedbacks are welcome.

RM_AverageDaysToPay.sql

VAIDY

Microsoft Dynamics GP 2015 RTM – Available Now


With more than 120 new features, Microsoft Dynamics GP 2015 RTM is now available to download for partners.

Screen Shot 2014-12-02 at 6.55.03 PM

Quite obviously, a PartnerSource account is required to get the new version.

Excited to see GP 2015 being released earlier than expected. Will get to learn about all new features soon.

VAIDY

CBM Cash Receipt AA Journal Issue & Resolution


Couple of days back, a user reported an issue. When she tried to open CBM Cash Receipts window, following message appeared:

Screen Shot 2014-11-25 at 5.48.52 PM

For all other users, when they posted any Cash Receipt, an Analytical Accounting Journal report would open with some entries on it; particularly with 5 cash receipts. User, who reported the issue, confirmed that the records shown on AA journal report were posted by her and only after posting them, the above error message appeared.

Since the report is AA journal, I first checked the AA Sub Ledger tables (AAG20000 series) and confirmed that the entries shown on the AA journal report are present without any issues. If I get rid of the above error message, things would be normal and this particular user can continue with her entries. Task on hand is to find out AA journal report tables and see the stuck/orphaned records and clear them.

Issue: Records got stuck on AAG50000 (AA Sub Ledger Report Header), AAG50001 (AA Sub Ledger Report Distribution) and AAG50002 (AA Sub Ledger Report Assignment) tables.

Resolution: Remove them. Simple. What you MUST note here is that all records (including genuine ones) would be present on these tables. You MUST note down AA Sub Ledger Header ID of the ones that are stuck and use below query to delete records.

DELETE AAG50000 WHERE aaSubLedgerHdrID IN (<aaSubLedgerHdrID>,<aaSubLedgerHdrID>,...) 
DELETE AAG50001 WHERE aaSubLedgerHdrID IN (<aaSubLedgerHdrID>,<aaSubLedgerHdrID>,...) 
DELETE AAG50002 WHERE aaSubLedgerHdrID IN (<aaSubLedgerHdrID>,<aaSubLedgerHdrID>,...)

Replace <aaSubLedgerHdrID> with respective AA Sub Ledger Header ID of the stuck records.

NOTE: Always take a backup of records before you delete.

VAIDY

Simulate DEX_ROW_ID in a SQL View Using ROW_NUMBER() – #MSDYNGP


I have a requirement in which I have to access a SQL view from within my customisation dictionary, in order to create a custom lookup for users to select a value based on an Extender form and an Extender lookup. Easiest option is to create an Extender view (which in turn creates a SQL view for us).

Now, this is the view that I am suppose to refer to from my custom dictionary. Dexterity allows us to refer to any SQL object by simply create a TABLE definition and mention the SQL object (table or view) name as the physical name.

Dex View

Everything looks perfect till you actually see below error messages at runtime:

Dex View - Error 1

Dex View - Error 2

Error message is quite obvious; you do not have DEX_ROW_ID in that SQL view that you are referring to. Every single Dexterity table must have DEX_ROW_ID at the backend. It cannot afford to not have one.

So how am I going to resolve this? By simply adding a record number dynamically to the SQL view created by Extender. How to do that? By adding the T-SQL function ROW_NUMBER(). This is how I achieved it:

ROW_NUMBER USAGE

 

Definition of ROW_NUMBER() can be found here: ROW_NUMBER (Transact-SQL).

A simple yet powerful SQL function has given me the power to do what I wanted in no time. Oh, and my custom lookup referring to this view is working like a charm. Users are happy and so am I.

VAIDY

Analytics For Dynamics GP – BI Solution From Mark Polino (DynamicAccounting.Net) #MSDYNGP


Mark Polino of DynamicAccounting.Net has released first among series of Excel Dashboards, Sales Analytics Starter Edition, for Dynamics GP. This dashboard series is named as Analytics For Dynamics GP.

Sales Dashboard

Sales Starter Edition has got following charts with whole set of important filters:

  • Top Customers (with costs)
  • Top 10 Products (with costs)
  • Top 10 Salespeople
  • Top 10 Sales Territories
  • Top 10 Sites
  • Sales with Trend and Projection
  • Sales Mix with Item Class

It’s a simple plug and play kind of dashboard on Microsoft Excel (v2010 & v2013) file. Setting this up once you buy it is so very easy. How to map your GP data server is clearly explained as part of this dashboard solution. And you can modify this as you wish once you link this to your GP data server.

As it is just an Excel file with a straightforward GP data server connection, all you need to do is to click on refresh to get the real time information.

This sales dashboard starter edition is priced at $249 +$49 annual maintenance. Maintenance covers updates, improvements and fixes. Click on links provided across this post to visit Mark’s Analytics For Dynamics GP product page, learn more about this awesome BI solution and know how to buy your copy.

In my personal opinion, this is a simplistic and satisfactory BI solution which meet its promises pretty well.

VAIDY

#MSDYNGP Extender View Involving Extender Window/Form – Strange “Add Link” Issue & Reason.


Firstly, I am not sure whether I should categorise this as an issue. Let me explain this with an example.

For illustrative purpose, my requirement is to assign an additional information to customers. In addition to Country Code, I would like to assign from which continent a customer is from.

First step; to create an Extender Form named Continent Maintenance in which I will maintain list of continents. I do not need anything information other than an ID (Continent ID) and a name (Name); as shown below:

Snip20140114_1

Note that there are no fields apart from ID and Description.

Second step; I am going to create an Extender Window for Customer Maintenance (Cards -> Sales -> Customer -> Additional -> Continent) to assign a continent to a customer. Extender Window definition is as follows:

Snip20140114_2

Third step; is to check whether things are properly done and confirm. Let me open Customer Maintenance and see if I can access this new Extender information:

Snip20140114_3

Perfect. Let’s now get into the actual issue.

I would like to create a view to retrieve customer continent information. To achieve this, I would like to link Assign Continent (Extender Window) with Continent Maintenance (Extender Form) to get the continent name. Ideally, my view should retrieve following:

Customer ID, Continent ID, Continent Name

Now, when I try to create an Extender View linking my Extender Window and Form, I end up facing below issue:

Snip20140114_4

Snip20140114_6

Did you see that? I do not have my Extender Form fields shown here. I have two fields; Continent ID and Name. Where are they? Why are they not shown here? Shouldn’t it be available for me to link with my Extender Window’s Continent ID?

REASON: If your Extender Form DOES NOT have any other field than an ID and a Description (in my case, Continent ID and Name), ADD LINK To Field will not list out the ID and Description fields.

Is that the actual reason? Let’s confirm by adding another field to Extender Form as follows:

Snip20140114_7

After adding above field, Additional Info., look at my Extender View Add Link now:

Snip20140114_8

Did you see that? They are available now. AFTER adding a field in addition to default ID and Description fields.

And I am not sure how many have ever noticed this. I am noticing it for the first time now. I haven’t created any form with only ID and Description till now. I had to spend 4 hours to identify this reason, honestly. Had no idea whatsoever.

Those who are going to deal with Extender views with form(s) having ONLY ID and Description fields, save your 4 hours. :-)

VAIDY

Management Reporter Configuration – Part Of Domain Error


I am not sure how many would have noticed this error message. Just thought of sharing this with you all.

I installed Management Reporter 2012 CU7 on my machine yesterday night for some testing. I had not done this outside a network (being physically away from a domain) before, so never expected an error. But following error message popped up:

Snip20140106_4

 

My machine is already part of a domain. So above message was a bit confusing. Later I realised that I MUST be connected to my domain when the configuration process is run.

Which means the machine on which you are installing Management Reporter Server component CANNOT be physically outside the domain (even though it is already added to one) when you configure it.

This morning I restarted the configuration process and it’s done without issues. Interesting.

VAIDY