Wednesday, July 24, 2013

Advanced Notification : Due Invoices per Sales Person

Recently I was involved with a case in which some finance notifications were required. One of the notifications was an alert for the sales persons with all invoices which are due for more than 30 days. This alert had to be sent once a week. The body of the message should include a list of all due invoices with the invoice number, outstanding amount, customer name and the days due.



There are a few points of attention in this scenario:




* A notification may only be sent if the sales person has invoices due for more than 30 days. For each sales person it has to be checked if there are customer ledger entries within the specified filters. The standard xml generator will export all sales persons regardless they have customer ledger entries or not.

* "more than 30 days" is not a normal filter but a date formula which has to be evaluated. The Microsoft Dynamics NAV TableFilter property does not support date formulas to be specified. Additional code is required to evaluate the date formula to a normal filter.

* The number of days due is not a field in the customer ledger entry table. This is the result of a calculation.



We are now entering an interesting area. Standard configuration is not sufficient here. We need to extend the product. As you probably know, NAVBIS2013 has been provided with a Software Development Kit (SDK) which is included in the software release package.



Which extension points do we need? This scenario can be solved by using two custom codeunits for the Sales Person / Customer Ledger Entry tables and a custom expression function .. hmmm



For NAVBIS2013 we redefined the added value of the product. We focus on SUPPORTING THE FULL INTEGRATION LIFE-CYCLE and have identified the following principles:



* User Experience

* Reduce Implementation Time



Is the suggested solution aligned with these principles? The solution might become a bit cumbersome to explain. Different customizations have to be implemented. This will most probably violate the added value principles of NAVBIS.



Luckily there is another principle: we don't want to compete with Microsoft Dynamics NAV platform functionality. In addition we want to embrace the standard stuff as much as possible.



What if we would use an XmlPort to extract the required date with C/AL code? In that case we can make one isolated object which does all the tricky stuff. Basic programming skills are sufficient to develop an XmlPort for a scenario like this.



NAVBIS2013 does support XmlPorts out-of-the-box by adding the XmlPort Xml Generator activity to your connection. This activity runs an XmlPort from which the output can be used in the pipeline.



In the next post I would like to explain how the notification has to be configured to generate this email:



The notification how it is generated by Notification Management.
Full Post

No comments:

Post a Comment