ArcherPoint Dynamics NAV Developer Digest - vol 159
The NAV community, including the ArcherPoint technical staff, is made up of developers, project managers, and consultants who are constantly communicating, with the common goal of sharing helpful information with one another to help customers be more successful.
As they run into issues and questions, find the answers, and make new discoveries, they post them on blogs, forums, social media...so everyone can benefit. We in Marketing watch these interactions and never cease to be amazed by the creativity, dedication, and brainpower we’re so fortunate to have in this community—so we thought, wouldn’t it be great to share this great information with everyone who might not have the time to check out the multitude of resources out there? So, the ArcherPoint Microsoft Dynamics NAV Developer Digest was born. Each week, we present a collection of thoughts and findings from NAV experts and devotees around the world. We hope these insights will benefit you, too.
Positive Pay in Dynamics NAV 2017
One of our consultants reaches out for help with setting up Positive Pay: “I am working on a few Positive Pay setups in NAV 2017. One of the things I get hung up on is trying to set a date format to meet specific bank requirements. Additionally I also get stumped with setting up the Amounts. I know that there are transformation rules that can be applied that transform data, but if anyone has an easy way to set up the following I would appreciate it.
I need a Date formatted with either 6 or 8 characters, for example September 8, 2017 would be 09082017 or 090817.
I need a decimal field (amount) with no decimals, for example 625.32 would be presented as 62532.
I have read through much of the MSDN stuff available, but it gets very technical, and I struggle with understanding it.”
Kyle responds, “Date: Two ways to do this, and looking at the attached screen snap, I am using both. Which means I don't know which one actually wins.
First is setting the Column Definition Data Format field. Re-arrange what I have in the screen snap to get it ordered with the month first.
Figure 1 - Wells Fargo Positive Pay setup in Dynamics NAV
The other way is a Transformation Rule. Transformation Rules is a table you can add to. You need something that looks like MMDDYYYY. When you drill into the Transformation Rule for a Field Mapping, click Advanced to add your own. Duplicate YYYYMMDD_DATE and just rework it for your specific format need.
Decimal: It strips the decimal if you choose Data Formatting Culture = en-US in the Column Definition. But beware you may need to pad with leading zeros. See screen snap.
What little knowledge I have was learned the hard way with long debugger sessions and lots of trial and error. This section of NAV is horribly documented.”
Alan: “I also understand that it is very obtuse compared to other areas of NAV.”
Using Custom Report Layouts in Dynamics NAV 2016
Bill W: I’v been trying to utilize the Custom Report Layouts in NAV 2016. These are a couple things I wish I knew before I started.
Using RDLCLAYOUT inside of the report, ie. " CurrReport.RDLCLAYOUT := " seems to work about 80-90% of the time. I'd walk through the code see the layout read into the stream and then set the new layout, and then see the default layout on the report, not the one I had just set. No idea. I had to move out one step further and set the layout BEFORE calling the report to get that to work reliably.
Once you pull out a Custom Layout there isn't a way to send it back as the default layout. I had to manually in the text file remove and add a layout that I had edited outside of the report.
Matt T: Also....because we don't modify base objects :)
Bill W: This *could*, *maybe* (probably not) be easier with AL where I have the RDLC file right there to "override" a report. This is all managed through blobs and streams and you have to export to get the RDLC out into text.... it's a whole deal. Not my first choice but it was there.
If this were to be the preferred way to modify a report I'd probably have daily crying sessions and fetal position rocking under my desk.
Quip of the Day
Our friend and colleague, Kyle, shares a struggle, which gave us a giggle:
“This is a completely hypothetical situation that I heard about from someone else who heard about it. But I thought I would share.
If you create a variable named DateFilter, it will compile just fine in the DEV client. But when you actually execute it, you get a very cool and nasty C# error message.
Figure 2 - C # Error in Dynamics NAV
This took the person that I heard about a decent amount of time to solve. Hypothetically.”
Stay abreast of what is new in the Microsoft Dynamics NAV community and at ArcherPoint by subscribing to our monthly newsletter, Better Business, by completing the form in our Resource Center.
And, if you are interested in NAV development, be sure to see our collection of NAV Development Blogs.