Quantcast
Channel: ArcherPoint, Inc. - Developer
Viewing all 388 articles
Browse latest View live

ArcherPoint Dynamics NAV Developer Digest - vol 185

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 185ArcherPoint's Developer Digest Weekly Blog

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.

Dynamics 365 Business Central

With the upcoming release of D365BC, you’ll find an abundance of resources and opinions to stay up to date.

This is the primary Dynamics 365 Business Central product page from Microsoft.

The D365 Roadmap site lets you filter on what’s new, in development, and previously released.

And here’s the latest out of Directions Asia. Everyone seems to be excited about the transformation and the future of Dynamics NAV, including our own Jon Long and Saurav Dhyani.

The next iteration of our beloved Navision, Dynamics 365 Business Central will be generally available on April 2. Stay tuned!

Skype for Business and More Improvements for Microsoft Teams

Microsoft’s Tiffany Wissner recently shared the updated roadmap for bringing Skype for Business to Microsoft Teams. In addition to the Skype improvements, you can now securely collaborate with anyone in Microsoft Teams. This is exciting for us because we can now include anyone in our projects, whether they have an Azure Active Directory account or not. ArcherPoint’s Matt Traxinger notes that if they add this to Visual Studio Team Services, it will be amazing. Suresh notes that in VSTS, the messaging extension for Microsoft Teams allows you to search, find, and discuss specific work items in your channel or private chats. It’s a great way to have a group conversation about your work, without leaving Microsoft Teams.

Common Data Service Now Included in Microsoft Power Apps

In the spring update to Power BI and Power Apps platforms, Microsoft now provides a common data service, enabling companies to build data-based apps from a variety of data sources.

Code Reviews Are Not (Primarily) for Finding Bugs

Peer code reviews are standard practice in software engineering. At least they should be. Here’s why:

  • Multiple perspectives improve the code review
  • Finding bugs
  • Ensuring the code’s long-term maintainability
  • Knowledge sharing

This is a great article on the costs and benefits of peer code reviews and how to make them more efficient.

ForNAV Modern Object Explorer

ForNAV is offering their Modern Object Explorer for free. It provides a way to manage Visual Studio AL code from within NAV. They state that you can use it to get an overview of Extension objects installed, create and manage VSC AI projects, and export and/or run your Extension AI objects.

Share your experience using ForNAV in the comments below.

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 186

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 186ArcherPoint's Developer Digest Weekly Blog

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.

March Developer Preview for Dynamics NAV

In Microsoft’s Developer Preview – March Update, you’ll learn about static code analysis, help for new pages, creating role center headlines, an improved experience for event subscribers, choosing the cue layout on role centers, and inspecting contents of tables.

AL Language Extension

The Visual Studio Code Marketplace is offering a CRS AL Language Extension. Definitely a “must-have” for AL developers!

Debugging Dynamics NAV

Adrian reports, “I have multiple versions of NAV (2009 classic-2018) installed on my local machine and was having an issue with opening the session page and debugger for all versions except NAV 2018. I finally find the solution from  the Debugging Dynamics NAV in a side-by-side installation post on Dynamics User Group. Not sure whether there are other solutions, but this one works and I just wanted to share.”

NAVDATA Backup Restore Problem

Kyle asks, “Have any of you had problems restoring a NAVDATA backup where it fills up your disk? I have a single NAV company, exported from a customer that resulted in an uncompressed NAVDATA file that is about one GB. NAV 2017.

When I attempted to restore it on my local system, not only did it make the database explode to 50 GB, it also made the txlog grow to 30 GB, and it was still only 50% complete. It filled up my disk.

Has anybody else had that problem? I've also had the same issue with NAV 2015.”

Bill suggests, “Maybe the file autogrowth settings are causing the issue? Change from a percent to a fixed size. You could also try putting the dB recovery mode to simple during the restore.”

Kyle adds, “I already had it set to simple. And if I turn off autogrowth that just makes the restore die that much sooner (when it hits that wall, as opposed to when it fills up my disk). The problem is that restoring one GB should not need to consume 75 GB of database and log file space.”

He also notes, “I tried the same exact NAVDATA restore against SQL Express 2014, and it does not have the problem. So it must be something related to my SQL 2017. I have also confirmed that it doesn't matter whether I do the restore in RTC or PowerShell. I let it run for 14 hours and it never completed. Nothing useful in the SQL log. It consumed 160GB of database space before it just stopped working.”

Bill quips, “Did you try 15 hours? ;) It'd be interesting to see what's going on with a SQL trace. Have you tried the latest SQL 2017 CU? Maybe try the SQL Docker image to see if it is something environment related. What that might be though…”

If any of you have had a similar issue or know of a solution, please comment below.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 187

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 187ArcherPoint's Developer Digest Weekly Blog

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.

Dynamics 365 Business Central Buzz

The buzz around D365 BC continues, and why not? It’s a big deal. You’re going to need to get up to speed on the future of NAV, and Waldo’s blog gives us links galore to all the resources we need for Dynamics 365 Business Central.

This Kauffmann post explores the possibilities for ISV solutions and the current understanding of object licensing with D365 BC. Free objects. Yes free, you heard that right. Get your free trial of D365 Business Central here.

Saving Error Messages from the Adjust Cost Item Entries Job Queue

Denise brings up “everyone’s favorite topic: Adjust Cost Item Entries. She asks, “Has anyone written code to save error messages in a custom table when Adjust Cost Item Entries runs in the Job Queue? Or have any other ideas for determining what the error is that caused the job to fail without having to run it manually? Any suggestions would be appreciated!”

Matt T. replies, “I think the easiest way would be to move these three lines out of the report and into a codeunit:

InvtAdjmt.SetProperties(FALSE,PostToGL);

InvtAdjmt.SetFilterItem(Item);

InvtAdjmt.MakeMultiLevelAdjmt;

Then in the report you would do IF NOT <your new codeunit>.RUN THEN Log your error using GETLASTERRORTEXT.”

Time Saver Tip of the Day: Outlook Templates

Matt Cypher shared this tip with our team. “I was talking with Mel yesterday about how we often have emails that we send to folks that require some copying and pasting but the content is almost always the same (minus names, dates, etc.) and the best way to do this. I mentioned that I use Outlook Templates and she hadn't heard of this before, so I figured I'd share it with the rest of the tribe because it's been a HUGE time saver for me!

If you go to draft an email, over on the right hand side you should see something called 'Office Add-ins.' From here, you can save templates of emails that you use often and title them for easy future use. This literally saves me probably 20-30 minutes a week in drafting or copying duplicate emails. Just thought I'd share it for a good time (and hassle) saver.”

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 188

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 188ArcherPoint's Developer Digest Weekly Blog

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.

Looking for an SMTP Server for Test Output?

Look no more! Bill W. shares that after years of struggling to find an SMTP server to send test output to, SMTP4-dev, the mail server for development is now available on GitHub. GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.

Extending the Ship-To Code to the Sales Line

Michael H. asks, “Has anyone done a mod to extend the Ship-to Code to the Sales Line?”

Bill W. replies, “Yes, file: TAB37.txt ";Ship-to Code ;Code10 

If you add an exact string search for a field it narrows things down a little bit more.

If you see garbled characters just download the object - it opens fine in notepad. Still need to update the encoding on some of these objects.”

Opinions on Microsoft Dynamics NAV and Dynamics 365 Business Central

News and information about Dynamics 365 Business Central (D365 BC) has been coming in a steady stream from a variety of sources. Mark Brummel has written a series of intriguing blogs that we have been reading.

Here are several that may be of interest to our developer colleagues:

We look forward to more of Mark's blog. Please share your thoughts and opinions in the comments section below. We want to hear from you.

Add Upgrade Logic to D365 BC Extensions

Microsoft Dynamics 365 shares this video, explaining the three easy steps to add upgrade logic to an Extension for Dynamics 365 Business Central.

User Groups and Profiles

Amy asks for help with User Groups and Profiles. “I created a User Group called IT Group and assigned a Default Profile of IT MANAGER. I assigned myself to the User Group. My User Personalization, however, is set to BOOKKEEPER. When I login, my Profile is BOOKKEEPER. My expectation is that I would be logged in as IT MANAGER? What am I missing?”

The response is, “Amy, when you add a user member to the group, and that user does not have any Personalization, then it will create one with the default profile ID you have specified on the User Group. If you already have user personalization set up, then it will not modify that. So it will use whatever you have on the user personalization setup.”

Quip of the Day

Gwen B. shares: Am I the only person that correlates boarding an airplane with costing methods?

  • LIFO - Last in, first out.
  • Average - You’re not special, find your own seat.
  • Or my favorite, FILO - First in, last out.

Cindy: I will never board a plane the same again. I love this!

Tom H: Standard Costing - Everyone sits in the exact same seat.

Carrie: FISH - First in, still here.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 159

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 159Developer Dude

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.

Wells Fargo Positive Pay setup in Dynamics NAV
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.

C Sharp Error in Dynamics NAV
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.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 160

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 160Developer Dude

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.

Microsoft Announces Plans to Release Dynamics NAV 2018

The announcement is that Dynamics 365 will soon become a “single collection” of Dynamics 365 applications for any size customer, no more “Enterprise” and “Business” editions. Which is great because having different editions is just confusing to prospective customers. But the big news for us in the NAV (and GP) world is that there will be a General Availability release this year of Microsoft Dynamics NAV: NAV 2018. Can’t wait!

What is This Comment Field Doing on the Dynamics NAV Journal Page?

Gwen asks, “On the Journal Lines, there is a ‘Comment’ field. Does anyone know where the ‘Comment’ goes after the Journal Line is posted? I don't see the field on any of the Ledger Entry tables. What am I missing? What is the purpose of this field?”

Figure 1 - Comment field on Dynamics NAV Journal Lines
Figure 1 - Comment Field on Dynamics NAV Journal Lines

Kyle responds, “I just went through the journal posting codeunits and I don't think it goes anywhere. It is probably just there for cases where the person that makes the journal is not the same person who posts the journal.”

Bill confirms, “Yep, Prism confirms. It's exposed on Journal pages and then goes nowhere.”

Microsoft Excel Getting Smarter

Elly shares that Microsoft Excel is getting updated in the next release. It will have some of the features Power BI currently has of predicting information and creating suggested graphs and information insights, based on this TechCrunch article Microsoft Excel is About to Get a Lot Smarter. Utilizing Bing’s API, new data types, automatic visualizations, and machine learning models means very cool things for Excel users.

Leadership Lines

Kyle shares an interesting read on project management, where TechBeacon warns that focusing too much on predictability and efficiency will kill your software product.

This spurred a thought provoking response from Jon Long, but the important point that he got out of the article is the idea of managing to the product, not the project.

Matt T. responded with his thought that the fourth part of the project is what often gets forgotten. “When features, cost, and time are all fixed, the only thing that can bend to meet them all is quality.”

Figure 2 - Fixed vs. Agile Components of a Project
Figure 2 - Fixed vs. Agile Components of a Project

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.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 161

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 161Developer Dude

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.

Using Microsoft Dynamics NAV on Windows, iOS, and Android

The Dynamics NAV team blog shares added support for Windows 10 updates and hinted at support for “interesting features and devices,” stay tuned.

Additionally, as of October 2017, the Dynamics NAV app will no longer support the Windows Phone 8.1 You’ll need to upgrade to Windows 10, although they are offering a grace period.

Lastly, Dynamics NAV will support iOS 11 and Android 8 at the time of their releases.

Saving Dynamics NAV Report as HTML File Prior to NAV 2017

Saurav shares in his blog how to save time transforming a report from a Word file to HTML using .NET components. This process is specifically for versions NAV 2013, NAV 2013 R2, NAV 2015, and NAV 2016, since the Report.SaveAsHTML function was supported prior to these releases, and was reintroduced in NAV 2017. The .NET variables used are WordApplication, WordDocument, WordHelper, and WordSaveFormat. See Saurav’s blog for the complete post.

How to Test NAV Web Services

Saurav gives an example where a client has requested that their customer list be published via web services. However, they were unable to read it. So how do you go about testing it? He’ll walk you through each step and introduce a cool tool to help you test SOAP web services.

The History of Microsoft Dynamics NAV

If you’re interested in learning about the history of Navision / Microsoft Dynamics NAV, this video posted by Mark Brummel. It’s only an hour long…

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.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 162

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 162Developer Dude

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.

Microsoft Dynamics NAV 2018

It has been announced that Microsoft Dynamics NAV 2018 is ready and will be made generally available (GA) on December 1, 2017.

Some things that the ArcherPoint team is excited about with 2018 are:

  • Integration with Microsoft Flow

  • An .exe file that will convert C/AL to AL

  • Microsoft’s Testability Framework

  • Further integration within Microsoft Office – order to cash without leaving Outlook!

Speaking of Navision…

Kyle tries to make everyone jealous with this post:

Please don't hate me even though I get all of the best projects.

Navision Financials Product CD
Figure 1 - Navision Financials Product CD

This inspires a bevy of responses:

Quentin: Frisbee? Coaster?

Tim Lecander: Do computers come with CD players anymore?

Kyle: I have an external USB drive. And one of these:

Microsoft Windows NT Server CD
Figure 2 - Microsoft Windows NT Server CD

Tim Muldoon: Are you sure that's a CD? Looks like you will need a turntable for that.

Kyle: Relevant statistics: Cronus database is 30MB and there are only 1223 objects.

Jon Long: You sir, are a nerd.

Crystal: I think this means you can add ' Archeologist ' to your resume.

Modifying a Field Drop-Down in Dynamics NAV Role Tailored Client

Gwen Cain: I don't know if this is possible but I had a client ask if I could modify the No. field drop down on the Sales Order to include different fields. So normally, if Type = Item, then it shows the Item No., Description, Base Unit of Measure and Unit Price. Can this be modified to include an additional field? Thanks.

Bill W: You're looking for "Field Groups" defined on the table. View -> "Field Groups." Right underneath the keys. By default it will use the one named DropDown. This will be a global change anywhere there is a dropdown for that table.

Gwen: Thanks Bill Warnke! I just found that. So cool! Why have I never known this?

Bill: You'll probably need to update the Item table's "field group" then. Essentially NAV takes the tables List Page and pares down the columns displayed to those defined in the Field Groups. I think that's the case because you can add a flowfield to the Field Groups and then get it to calc properly by adding a CALCFIELDS to the OnAfterGetRecord trigger. 

Thomas Hunt wrote about it is his blog Customizing Drop-Down Lists for Tables in the NAV Role Tailored Client

Tom: The impetus for writing most of my blog entries was that there was something I wanted to do that I didn't know how to do and that wasn't obvious. So when I finally figured out how to do it by reading six different blog entries from other people and pouring through documentation, I wrote a concise guide on doing it, so that next time I needed to do it, I had instructions written out.

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 163

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 163Developer Dude

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.

Using NAS to Upload Data Sync Files on Dynamics NAV Version 5

Tom H: I've been working with a customer running NAV 5, and they use the NAS to upload data sync files to their web site. They're having a problem with WinSCP not uploading the files correctly. If you run the job manually, everything works fine, but if you run the job via the NAS, it does not complete and it does not give any messages informing you why. Does anyone have any ideas what might be wrong?

Suresh: I am hoping you have already restarted the services. Another thing you could try is to debug the NAS from the command prompt. I believe there is an article online on how to debug it.

Nitin: If you are using script to run WinSCP, check the log and compare it when it runs manually vs. NAS. I had a similar issue recently. Let me know if you need further help in this area.

Kyle: What account is the NAS running under? That account might not have the same security rights as your account (when you run it manually). Is there anything in the Application event log? Can you tell if the problem is that the script isn't starting at all, or is the script starting but just failing to complete?

Nitin: Login to server as a NAS user and try to run the script manually. If it still has the same issue, type commands one by one to the command prompt where you have WinSCP program. I had trouble with Network Folder path (e.g., c$ vs c: in script, NAV not recognizing network folder when run using NAS), try changing folder path to something local.

Also, during troubleshooting with WinSCP script, I found that if there is any special character in SFTP/FTP password (e.g. '+'), it must be replaced with '%2B' in the script.

Tom: Never mind . . . I just switched them over to using a scheduled task. I feel like that will get them by until they upgrade from NAV 5 to something that will do a better job of integrating. Thanks for the advice, everyone.

AL Formatter

See the VS Code extension for formatting AL files, which features indenting, keyword case style, and variable sorting. This is "In Development" full implementation of the Microsoft C/AL coding guidelines.

Microsoft Redesigning Outlook for Mac and Windows

Outlook has a new design coming in the future as announced at Microsoft Ignite. A release date hasn't been set yet, but the changes are interesting. You can read a brief overview here at the link above, or if you are really interested you can watch the hour+ long presentation from Microsoft Ignite.

 

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 164

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 164Developer Dude

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.

Microsoft’s Team Foundation Server (TFS)

TFS gets kudos from ArcherPoint developer Kyle Hardin:

Kyle: TFS is the bomb! I just did a text compare of an object's current version against the previous version to see exactly what changed for the most-recent release, all right in Visual Studio.

Jon: Anyone get 2018 in there yet? I'd like to see the delta with 2017.

Kyle: They just released the October developer preview, but the objects will probably drift a bit before the final release.

Dynamics NAV Developer Preview for October 2017

Suresh notes that there are some nice new features in the October update including add-in support, new dictionary and list types. Additionally ForEach is back and Microsoft has added support for the new Label translation syntax.

How to Schedule Dynamics NAV Services to Restart

In Suresh’s blog, he shares the PowerShell script that he uses to schedule a NAV service tier to restart.

Too Many Decimals to do Fixed Asset Depreciations?

Kyle had to fix a problem with a customer that somehow got Fixed Asset depreciations imported with too many decimals. Enough decimals that you couldn't do disposals or further depreciation.

He wrote a small SQL script to fix the entries.

use [CORNAVSQL]
go
declare @EntryNo int
declare @FALoop cursor
declare @Counter int

set @FALoop = cursor for
select [Entry No_]
from [dbo].[COR - PROD$FA Ledger Entry]
open @FALoop
fetch next from @FALoop into @EntryNo
set @Counter = 1
while @@FETCH_STATUS = 0
begin
update [dbo].[COR - PROD$FA Ledger Entry]
set [Amount] = ROUND([Amount], 2, 1),
[Debit Amount] = ROUND([Debit Amount], 2, 1),
[Amount (LCY)] = ROUND([Amount (LCY)], 2, 1)
from [dbo].[COR - PROD$FA Ledger Entry]
where [Entry No_] = @EntryNo
and [Amount] > 0
update [dbo].[COR - PROD$FA Ledger Entry]
set [Amount] = ROUND([Amount], 2, 1),
[Credit Amount] = ROUND([Credit Amount], 2, 1),
[Amount (LCY)] = ROUND([Amount (LCY)], 2, 1)
from [dbo].[COR - PROD$FA Ledger Entry]
where [Entry No_] = @EntryNo
and [Amount] < 0
fetch next from @FALoop into @EntryNo
set @Counter = @Counter + 1
end
close @FALoop
deallocate @FALoop
select @Counter

Adding Default Dimensions to the Dynamics NAV Location Card

Denise B: Location Default Dimension, has anyone added default dimensions to the Location Card?

Trish: Yes. The scope on this type of modification can be huge, but in this case the client limited it to the Revaluation Journal only. A custom action was added to the Revaluation Journal to update the values for a single Dimension Code from the Location Card default dimensions. The user selects the custom action after running the Calculate Inventory Value function, which establishes the Revaluation Journal records. 

Kyle: You would have to decide on an order that wins (e.g., Customer? Item? Vendor? Or your location?).

Matt: You don't have to decide, that's what Default Dimension Priorities are for. As long as you run it through the appropriate places in Dimension Management you should be fine. But there are a lot of places to change that code.

 

Thanks to the ArcherPoint developers, customer service reps, and consultants that make the Developer Digest blog possible!

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 165

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 165Developer Dude

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.

Microsoft Docker and Dynamics NAV

The buzz in the Microsoft Dynamics NAV developer world is all about Dynamics NAV images now available on Docker. While this is super cool for developers, some of our other readers may be like me, a layperson, looking for a more basic understanding of what this really means. From the ArcherPoint Yammer thread, we get this:

Jim: For the laymen among us, can you provide a short explanation of Docker and what it brings to our party? I went to the Docker website and it is a bit obtuse to say the least.

Matt: Here is my poor man's explanation, which I may not explain well…Imagine our customer. They have a SQL Server, a NAV Service tier, and clients installed in miscellaneous places. Today we remotely connect to their servers to do development. The future looks different for how we develop for and support these customers.

Docker is a container manager (not at all like our containers modification). Each container holds something, like a piece or set of software. When you want to do development, you launch a new Docker instance and configure what you want (or use a preloaded configuration). So maybe you want SQL Server 2012, with NAV 2013 CU12, with a Job Queue, the development tools, and Visual Studio. Each of those things might be a container, and they stack to build an environment in seconds / minutes.

Then we do our development, deploy it to the user's test environment through the service tier, test it in a web client, and release it. All without ever logging into their system.

Kyle: Think of them as miniature virtual machines that are very portable. You can take the same system (in this case, Windows Server 2016 Core with SQL Express and NAV 2018) loaded into a Docker image, publish it on the internet (as Microsoft did with this announcement), and then easily download and run that Docker image. The Docker image can also be put onto several different platforms. It can run locally on Windows/Mac/Linux (with the Docker application), or on AWS, GCP, or Azure without any modification. It's the portability and the publish/subscribe model that make them useful.

Jim: This helps (a little). I am guessing that there is potential time and cost savings for those managing apps that run in and are deployed in different environments. And these apps can be quickly reconfigured for various permutations as well. Correct me if I am wrong here.

Suresh: Docker is a tool to create and work with containers, whereas Container is lightweight alternate to Virtual Machines, containers are kind of a replacement to Virtual Machine whereas Virtual Machine uses its own operating systems and resources, but Container uses the resources of Host Operating System and it is very quick and easy to spin up a new software.

They are used for deployment of our application and to have uniform environment in DEV, TEST, and PROD Systems. For example if the development team used version NAV 2013 R2 with cumulative update 20, and when they deployed into test the user got an error related to a command which was introduced in CU 20 because the TEST system is running NAV 2013 R2 with Cumulative Update 19, to fix the issue we need to change the code or upgrade the TEST System. Whereas if we use Docker to create a container with all the dependencies and the software which are used for the development and distribute it and then the same container can be used in all our environments which will avoid those kind of dependency errors. It will also help us to spin various versions of NAV using container without conflict and the deployment size is very small compare to Virtual Machines.

Jon: The future is here! And it's magical. Referencing It Has Never Been Easier blog by Freddy.

Kyle notes: There are a few tricks if you want to run this in a VM, since you have to convince the guest OS that it is running on actual metal rather than in a VM and references the How to Run Hyper-V Nested in VMware Workstation article.

What is your experience with NAV on Docker? Tell us in the comments below!

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 166

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 166Developer Dude

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.

Appending a Document to a Printed Purchase Order in Dynamics NAV

Kyle: I have a customer that needs a large extra page of Terms and Conditions to be appended to a printed Purchase Order. This extra page is an entire page of 6-point font legalese. I currently have that stored as a PDF in a BLOB, and then right after the report prints, I have the system print the PDF. This works fine for printing, but not so well for attaching to an email since you wind up with two separate files.

I can't figure out a way to inject a PDF into a SAVEASPDF report.

So I am thinking of switching the PO report layout to Word, converting the Terms and Conditions from PDF to Word (so the BLOB is now a Word document), and then using DotNet Microsoft Word calls to combine the two and generate a single file.

Thoughts? Commentary? Personal insults?

Michael: Does the PDF have to appear with a particular format, or is it just raw text that could be read from a table and appended as an extra data item on an extra page of the report?

Kyle: It has to appear in a particular format. Parts are bolded, parts are italicized. And it is enough text that even if I could ignore the formatting, I'd have to make it BIGTEXT and somehow parse out each line and hope it wraps correctly.

Suresh: One way is to store the file in the specified format in a specific location as PDF, so that it is easy to modify the file if needed and then use the merge tool to merge the PO report PDF with that file. See this thread on adding another page on a PDF file.

Bill: If you paired the Blob Text Set and Get functions with an HTML Placeholder on the report, that might get you what you need, see Waldo’s entry on HTML on Reports.

Not sure about an HTML text editor to edit the text in NAV, but I've seen various add-in controls over the years. At worst, you could cut/paste the HTML out of a WYSIWYG editor.

Tom: I did something like this for a client some time ago, but I didn't have to deal with special formatting like bold/italic fonts. I did it by putting all the terms/conditions in a table, and then looping through the table and putting the text on a line. There was also a "Line Break" Boolean that let the invoice report know that it needed to break before a line. But with special formatting, you might just have to make it an image and then print that.

Kyle: I managed to get the two documents combined into one using DotNet and Word, but Word's PDF converter isn't 100% accurate, so it mangles the layout a bit.

I am going to have to cave and turn this into an image.

How about you, NAV developers? Have you run into this need? How did you deliver your solution?

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 168

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 168Developer Dude

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.

Adjust Cost Report in Microsoft Dynamics NAV 2009 Takes too Long to Run

Tom: Does anyone know about the Adjust Cost-Item Entries report to help me out with a problem a client is having? The issue is that there are a handful of items that have so many Value Entry records that Adjust Cost-Item Entries does not run in a timely manner. (I've been running the report for my test item for over five hours, and I'd estimate that it's not quite halfway done.) Is there a way I can tell it to process some of the activity for an item instead of all the activity? Is there something else I can do to speed it up? Any advice is helpful.

Matt: Average Costing? Adjust Cost has gotten better over the years and I see they are still on NAV 2009. You could get someone to look in SQL to see if there are any recommended indexes to add or remove. Generally, it should not take five hours to process an item every time. So if they are running it regularly there's not an issue.

Kyle: Doesn't the process mark Value Entries as it goes along so it does not have to do as much work the next time it runs? Maybe the process isn't completing correctly. If you run the report by hand, you can specify some filtering like locations or item number ranges.

Tom: It is not that the report is taking five plus hours to process every item; it is that it is taking five plus hours to process a few specific items, and I need to get those specific items processed.

It's one of those things where they have a shipping charge that's put on the order as an item, and so it goes on nearly every order, and then Adjust Cost has to grind through every order to get the adjustments made. (Side note: I wish customers would use Resources or G/L Accounts or really anything other than items for this.) 

Kyle: So write a small bit of code that runs adjust cost for a single item and run that during off-hours. Once it makes it through successfully, it should not need to touch those five-hour entries again.

Tom: If it were only that simple. By my estimate, the item that we're having trouble with will take 20+ hours to run Adjust Cost. Is there a way (or would there be any damage) if I could tell Adjust Cost to go after a specific number of Value Entries for an item?

Kyle: Someone smarter than me would have to answer that question. The only safe and sure way that I know is to find that 20 hours. All day Sunday, the next holiday, something like that.

And suggest they get a better server.

Jon: This is an age-old problem for customers. Modifying the report has not given performance increases relative to the amount of time it takes to make the modifications and analyze the data (it goes beyond the report and the data). I have made modifications that allow running a single Item (with COMMIT after a certain range as desired). That is just a band-aid, but it does log time metrics per item and can give insight into what items are actually causing issues. Even that can be a red herring. The customer will get very frustrated if you spend 40 - 100 hours with little performance gain. Unfortunately, I know this from experience.

What has worked for me:

  • Upgrading to the latest version of NAV
  • Upgrading the drives to Solid State (or better)
  • Upgrading the CPU speed (fractions can give dramatic increases in performance)
  • Upgrading to SQL Server Enterprise (I know it's expensive, but so are you)
  • Running the Adj. Cost nightly
  • Ensure proper VM Farm Resource Allocation (this can be huge)

So, when I am tasked with a request to solve a long running Adj. Cost report, and I've seen 48+ runtimes, I always ask stupid questions about their VM farm to determine if they have properly allocated their resources. And by stupid I mean I prod them until they reveal exactly how they've allocated their VM's. You'd be surprised at how confident a Senior Level Sys Admin can be until you prod them, only to find that they overlooked something obvious, like allocating 380 GB of RAM to the SQL Server, when the physical server only has 286, or they have a version of SQL Server that can't even use half of what is allocated. Brian Winfrey can help in this area.

Kyle: I think a key point is still getting lost. Correct me if I am wrong, but I though that once Adjust Cost had churned through its 20+ hours and made whatever corrections, that the next iteration would be much faster. It doesn't have to go back and look at every single value entry each and every time. So I still think if you can get it to run once and correct whatever 20 hour thing is out there, then you can turn it on nightly and it will stay caught up without taking too long.

Jon: You would think so, but, when it get's really bad, there's nothing you can do except try the suggestions I stated above. Customer A and Customer B, for instance. Before they upgraded their system, the Adj. Cost would take 40+ hours. If they run it immediately after it finishes it's 40 hour runtime, it takes a few seconds. But, at the end of the week, it churns for 40+ hours. For some reason, Customer A didn't want to run it daily, Customer B ran it every night, manually, and it would take 10 to 12 hours. They would kill it before users start their day, rolling back to the last item processed. They would catch up on the weekend, running it for 40 hours. There was literally not enough time in a week to run it fully every week.

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

ArcherPoint Dynamics NAV Developer Digest - vol 169

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 169Developer Dude

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.

Did You Miss Microsoft Tech Days?

If so, you can now view the NAV Tech Days 2017 Application SaaSification video on YouTube. Additionally, MSDynamicsWorld’s Jason Gumpert wrote a nice summary of what NAV developers are most excited about with the upcoming modern development tech in his article Dynamics NAV Developers Celebrate Broader Microsoft Tech Landscape (login required).

Dynamics NAV Cumulative Updates for November 2017

Sowkarthika shares the latest updates for Dynamics NAV from Microsoft:

Cumulative Update 12 for Microsoft Dynamics NAV 2017 (Build 18976)

Cumulative Update 25 for Microsoft Dynamics NAV 2016 (Build 49424)

Cumulative Update 37 for Microsoft Dynamics NAV 2015 (Build 49425)

Cumulative Update 49 for Microsoft Dynamics NAV 2013 R2 (Build 49431)

Cumulative Update 56 for Microsoft Dynamics NAV 2013 (Build 49426)

Dynamics NAV Developers Collaborate in Real-Time

Suresh shares Visual Studio Live Share, which enables developers using Visual Studio 2017 or Visual Studio Code to collaborate in real-time.

Bill is intrigued: “Wow. The collaborative debugging is pretty wild.”

Processing-Only Reports in Dynamics NAV

Kyle: Nav 2015+: I did not know that processing-only reports do not have to have a data item at all. You can put code in either the Pre or Post Report triggers, but it gets you a free request page if you need to prompt for something. See C83 as an example.

Suresh: Many of the processing-only reports are like that, even in older version we have those. For example Copy Sales or Purchase document reports, Carry out function report for requisition.

Code Question of the Day

Kyle asks a “silly code question of the day.”

If I do this:

FOR X := 1 TO STRLEN(SomeString) DO BEGIN

Does it call that STRLEN function every time it goes back to the top of the FOR loop?

Matt T: Yes, because there is no guarantee that the length of SomeString did not change within the code inside of the loop. When you write it as a WHILE loop it's easier to see that the condition needs to be re-evaluated each time through.

X := 1;

WHILE X <= STRLEN(SomeString) DO BEGIN

X += 1;

//If I did this it would cause the initial stored value to be incorrect

//SomeString := COPYSTR(SomeString, 2);

END;

Kyle: Since I know the string will not change, this would be more efficient than my initial code.

Y := STRLEN(SomeString)

FOR X := 1 to Y DO BEGIN

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

Refactoring to Dynamics NAV Events...Now

$
0
0

Refactoring to Dynamics NAV Events

Refactoring Dynamics NAV customizations to Events

To say there is a lot going on in the world of Dynamics NAV would be an understatement. However, it would also be a moot point as there is always a lot going on in the NAV world. However, now more than ever, I am urging a refactoring to events movement. And, not to incite panic, but I would do it now before it is too late and you are forced to do it.

Change is Coming

In the spring of 2018, NAV Cloud will be released. The name is yet to be determined. NAV2018R2, Tenerife, Navision, it does not matter. The important point here is that in this version of NAV, C/AL will be an option, but will eventually go away completely and AL will be the code base. Visual Studio (VS) will be the development environment and base NAV code will be locked down completely. (Note, this is yet to be confirmed and in fact will not be the case in the near future.) In the interim, it seems highly likely that we will be able to code in both AL and C/AL against the same code base.

In addition, in VS, you develop against what MS is calling a "package." It is essentially your base NAV/Addon code all packaged up as a set of assemblies and available in Visual Studio. It is still unclear to me now, but releases will be extensions for sure. I am just not sure about the release strategy for custom extensions. Will each customer have one extension of hundreds? We will see. It may be personal preference.

Update from Microsoft

The idea of a “package” and “locked down code” was disturbing to us at ArcherPoint. Therefore, I submitted a ticket to MS. They do state, "NAV will not be locked", but then later state "likely including the rules you mention not to modify core parts of NAV except via extensions." Those statements are up for interpretation as far as I can tell. I am waiting for clarification.

Clarification from Microsoft

"Of course things can change, but at least currently this is the status: we will continue to have the current development environment, and partners will continue to be welcome to build vertical solutions and customizations as they have so far. The environment may change, especially the current development client as this is based on the old NAV client, but then the same features will just move into another environment, and NAV will not be locked as far as customizations are concerned.

What will change is that we will have new offerings over time. Hosting NAV in the cloud opens up for new economies of scale, and this is where we will have a range of options, from individualized customized solution for a specific customer, to standard-solutions that will fit lots of customers, and the option to choose of course will decide at what price we can sell.

So as a partner you can stay with the current model. Or set up your own hosting solution on Azure, and you will still have full control. Or, if you go with some of the new offerings where MS hosts all or part of the platform/infrastructure, and then take the restrictions and options that come with this, likely including the rules you mention not to modify core parts of NAV except via extensions. On the other hand, this method brings economies of scale, so opens up new opportunities and new markets.”

The only thing that I can say for sure is that there will be new options and new choices to make, but this will more be business choices than tech choices, and at least for now there are no plans to take away any options including the option where you customize NAV for one specific customer. Only to introduce new options.

More from Microsoft: "There are no plans to stop partners from modifying NAV. But you can see it as an option to transform gradually and get your developers used to using Extensions when possible, which will also have a side effect of making upgrades easier. So it should be more of a journey than a hard point in time when you must move from one way of doing things to another."

Maybe things will not be changing as radically as we had feared. Nevertheless, I would still say it is better to refactor to events sooner rather than later.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 170

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 170Developer Dude

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.

Microsoft Dynamics NAV 2018

NAV 2018 has been released and available for download. You will find the various country versions here as well as a plethora of other resources for Dynamics NAV 2018 including this list of system requirements.

Shrink Your Database with this SQL Script

Our friend Mark Brummel shared this on LinkedIn:

When you work a lot with CRONUS databases to test, develop, and train you have noticed that they always have FULL recovery model and it eats up your disk space. This link has a SQL script that changes all user databases to SIMPLE recovery and shrinks the log.

Defining Labels in a Dynamics NAV Report

Kyle notes, “I learned something new today. In a report, you can define Labels which are a quick and dirty way to get text constants into a report layout without having to define Text constants and then add them to the dataset. They show up in Visual Studio as Parameters. See attached screen snaps. They also support multiple languages.”

Set Parameters in Visual Studio Code for Dynamics NAV report
Figure 1 – Visual Studio Parameters

Figure 2 - Report Label Descriptions
Figure 2 – Report Label Descriptions

Figure 3 - View Labels
Figure 3 – Development Client View Labels

Suresh responds, “If you are using data item column and want to use that caption then IncludeCaption on the column can be set, which is available in the same Parameters.”

“System.Out Of Memory Exception” Issue on Inventory Valuation Report

Adrian reaches out for assistance: Is anyone aware of any hotfix or solutions to solve the "System.Out Of Memory Exception" issue for the inventory valuation report in NAV 2013 R2? A client has a customized report based on the NAV inventory valuation report and the issue occurs from time to time. The report may work pretty well sometimes, but if the As-Of-Date changes, the report first gives the out-of-memory error and then it is printed with issues (the data is not correct, the title is missing, etc.). Thanks for your help in advance!

KC responds: Have you looked at the dataset for the report?  I'm wondering if more lines are being sent to the report and the report is totaling them. 

If that is the case, then total the lines in the code and only send the total to the report. That will save memory and increase the speed of the report.

Darren chimes in: Have you reviewed the NAV 2013R2 Cumulative Update summary that Sowkarthika Rajendran published? It would list all the little hotfixes and patches fixed.

Adrian found the hotfix, update rollup 1 for Microsoft Dynamics NAV 2013 R2.

Dynamics NAV 2018 – NAV Easy Security Update

Gwen provides an update for NAV Easy Security:

The NAV 2017 code has been tested and works when compiled in NAV 2018. Field Level and Data Security works in the same manner as before. Mergetool will deliver the permission sets two months after the NAV 2018 release date from Microsoft.

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 171

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 171Developer Dude

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.

Dynamics NAV Development Preview – December 2017

Updates include the AL Formatter, which gives you the option to format your source code automatically; Show My Code, which specifies if the source code must be visible when other extensions debug it; and a new property called UsageCategory, which specifies how objects will appear in search results.

AL Extensions: Importing and Exporting Media Sets

This blog covers some of the changes with Extensions v2; specifically working with media and media set file types. Changes are covered and streams are introduced.

How to Connect SQL Server Management Studio to NAV 2018 on Docker

This is a quick how-to article that shows how to connect SQL Server Management Studio to a Dynamics NAV database on Docker.

Setting Up Power BI Without Using Azure AD

Ginny asks, “Does anyone know if Power BI can be setup without using the Azure AD?”

Saurav responds, “There are two ways:

  1. We can have Power BI Desktop, which the developer uses to develop the report. This can also be used to run reports.
  2. I think we can use Power BI without NAV on Azure. If I am not wrong, we were using Power BI in our internal NAV instance before we moved to Azure.

But by using any of the above ways Power BI cannot be integrated inside Dynamics NAV.”

He continues, “Ginny, I don't think it is possible to setup Power BI without Azure AD. I am assuming they have local AD to manage users and groups. There are options to sync up local AD with Azure AD, but for power BI to work you need to have Azure AD. Here are couple of articles explaining it, Understanding Azure Active Directory and Azure Active Directory and Power BI.”

Trick for Reducing the Memory Usage of Images on Reports

Kyle notes, “I cannot claim credit for this trick. I found it in one of Suresh Kulla's reports, so credit goes to him.

If you have an image in a report, that image will get stored on every single record of the resulting dataset. If your image is large, say an entire page of Purchase Order Terms and Conditions at 1200 dpi, you don't really want it on every dataset row. It will consume a lot of memory and make the report slower.

In your main data item OnAfterGetRecord, do something like this:

RecordCounter += 1;
If RecordCounter > 1 THEN
CLEAR(Image);

Then just make sure your RDLC does a First(Image).”

A Trip Down Memory Lane

Erik shares a bit of nostalgia with us on DUG in his article, “My New Love Affair with an Old Flame.”

Just How Many New Objects are in NAV 2018?

Saurav says “lots.” Curious? See his post, NAV 2018 – Lots of New Objects!

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 172

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 172 ArcherPoint's Developer Digest Weekly Blog

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.

The Wow Factor of Dynamics NAV 2018

The blogosphere is abuzz with many articles on NAV 2018. Roberto Stefanetti shares the things that made him say “Wow!” about NAV 2018, now that the release is generally available. In a nutshell, most impressive for end users are:

  • User personalization and web client, including ability to position freeze panes
  • Preview reports on the web client
  • Excel reports menu option in the ribbon menu
  • User tasks
  • Embedded Microsoft Flow

And for the technical / developer users:

  • Choose your development environment (C/SIDE and C/AL or VS Code and AL)
  • Extensions 2.0 publishable / installable
  • Default and Service Language
  • Change server without restart
  • Obsolete state for tables, fields, keys
  • PowerShell cmdlets
  • Universal App and Windows 10 Continuum
  • ASP.NET core
  • OData V4 bound actions

Check out the full article for all the details. Login to MSDynamicsWorld required.

Establishing Inventory Periods

Alan reaches out to the team with this issue:

“I am working with a customer, and trying to institute Inventory Periods for them. The problem is that in 2008 they deleted a bunch of Items. Now my understanding is that NAV goes through and removes the Item Number from the Item Ledger and Value entries.

I am getting an error trying to close an Inventory Period, because an item has been deleted.

Is there any magic or voodoo to work through this error? Have you encountered this and can you advise me on how to setup and use Inventory Periods, even though quite a few items have been deleted?”

Kyle responds, asking, “Have you confirmed that you actually have entries that have a blank Item No.?”

Gwen chimes in, “Just a casual, quick thought. What if you give her what she wants? If Navision wants an item number, give it to her. Can you import a null item record, and rename it so it grabs all the deleted item data?”

Kyle responds, “That is why I'm asking about the actual entries. Either they are blank, in which case I'm not sure what you do. Create a single item card and then set all of the blank entries to be owned by that one item, close your period, and then put them back to blank? If they aren't blank, you'll have to create each missing item number. A developer may help you on your quest.”

Alan answers, “Yes I do have Item Ledger and Value entries with no Item Number. I will try Gwendolyn's suggestion, but it may be onerous, as there are about 72k without items.”

Farewell to 2017

I just want to say thank you for your readership and wish you all a most prosperous 2018!

Happy New Year Everyone!

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 173

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 173 ArcherPoint's Developer Digest Weekly Blog

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.

Can I Run NAV 2015 (and earlier) on Docker?

Suresh asks the question and shares Freddy’s answer in his blog post.

Bill W. wasn’t successful the first time and replies “Huh, I'll have to try again, I was getting errors trying do a 2015 container.”

Suresh: Try the latest CU or above CU 7.

Bill: I was doing CU 16 and then the latest. Had to isolate an issue with the latest CU so this was a total pain to have to install into a new VM. Have you done this successfully?

Suresh: Yes, but I had trouble with RTC needed to troubleshoot. Dev client and webclient are working fine. You need to make sure you have generic image downloaded.

I even got RTC working when I use the container IP address, I might have to update my host file to use the name.

Bill: Tried again, I had to unblock the zip file before I extracted it.

Updating Currency Using Currency Exchange Rate Web Service

Roger asks, “I’m looking for information on Updating Currency using the Currency Exchange Rate Service. It looks like NAV introduced this in 2016. Does anyone have any experience with it?”

Alan L responds, “It appears that YAHOO no longer offers a free service for the currency updates. As a result Microsoft found another service: Float Rate.

Attached is a RAPIDSTart package and Instructions to set this up in a 2017 database. I have tested this in a test environment, and it seems to work well.”

Helle shared a RapidStart package that creates a Currency Exchange Rate Service called FLOATRATES and a Data Exchange Definition called CURRENCY0002. She wasn’t sure why, but it also creates CURRENCY0003 and links that one to FLOATRATES. In order to correct, "Data Exch. Def Code" field in Curr. Exch. Rate Update Setup must be updated accordingly (i.e. CURRENCY0002 instead of CURRENCY0003). FYI, the field is not on the card by default.

Another "interesting snafu": TryFunction works differently in NAV2017 vs. in NAV2016. The way currency exchange rates now get updated with FloatRates (because the URL returns all currency codes vs. Yahoo Finance, where the URL only returned values for the currency codes in the company), it is necessary to use codeunit 1280 Map Currency Exchange Rate from NAV2017 if you're using NAV2017 executables.

Apparently, there's also a parameter on the service that can be changed from its default value, so TryFunction will work in "2016 mode." I did not try to change that.”

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

ArcherPoint Dynamics NAV Developer Digest - vol 174

$
0
0

ArcherPoint Dynamics NAV Developer Digest - vol 174ArcherPoint's Developer Digest Weekly Blog

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.

Multiple Discounts in Dynamics NAV

Adrian asks, “NAV selects the highest sales line discount among the multiple effective sales line discounts covering a sales line. Is there a way to add sales line discount on the top of another on the same line? Thanks for your ideas in advance!”

Todd replies, “…one of our clients has something like this but you have to add a new table to hold the multiple discounts for each line. You then sum up the discounts in this new table to arrive at "Line Discount %". We can review if you want. It's a little involved. Maybe others have done something easier.”

Michael adds that another client has customizations for an interface with a 3rd party discount application. He explains, “Records are pushed into a custom table in NAV. The Job Queue runs a codeunit that "sums" the multiple, active discount records into the Sales Line Discount table.”

How to Print Dynamics NAV Code

Bill shares How to print (like on real paper) from Visual Studio Code and from Dynamics NAV C/AL.

Dynamics NAV Table Relationship Diagrams: Two Sources

Adrian shares that he found a website for a free NAV 2016 table relationship diagrams

Bill adds that by right clicking on a table in Prism and picking "Explore Table Relations" gets you something similar. He elaborates, “If our customer's Master branches are up to date in source, you'll have what this offers plus all of the customization.”

Packt Books and Videos Now on Sale

Suresh found on Twitter that every Packt eBook and video are only $5. Time to grab a book and do some learning! 

KC notes that they provide a free daily book from PacktPub, but it is temporarily unavailable while the $5 sales is going on. Make a bookmark for future reference. 

Standard Cost by SKU in Dynamics NAV

Sherry has a client looking to implement standard costs by SKU and asks if we ever done this customization for another client.

Rick Dill states that he does not recommend it. “Standard Cost by SKU is a huge modification, and to be honest should be avoided. Let me make a partial list of the things that would be involved:

  1. NAV does not let you store BOM and routing by SKU so you cannot have different bills or routing by SKU/location.
  2. NAV does not store the "single level and rolled up" cost fields by SKU, these fields are important, as they are used to calculate variances. (Note there is a roll process on the Item card that would need to be changed as well to make sure it updated the SKU card.)
  3. The standard cost roll from the standard cost worksheet is the only way that costs should be rolled and implemented (to make sure inventory is revalued correctly). The standard cost worksheet is not designed to accommodate location/variant differences in cost (in part because of points 1 and 2), so the cost worksheet would need to be modified to accommodate cost by variant.
  4. Maybe the most significant reason of all is that the transfer process/logic is not designed to handle different costs per SKU. NAV would not know how to handle the cost change between location/variant when it is transferred, Keep in mind that the transfer process must move from one location to another, and the costs must remain the same. Therefore, a modification would need to be made to know what cost element had changed, (material/labor/overhead/subcontracted/MFG Overhead), and then logic would need to be added somewhere that would generate G/L entries to account for the cost difference, and where the difference should post.
  5. Production Order variances are calculated during the "Change Status" to finish, and adjust cost entries would need to be changed to know how to calculate the variances and post the variances based on the fact that the Cost elements are stored on the Item card, not the SKU card (which would have to be changed if there are different costs).

This is such a huge change, and really changes the core of the financial logic of NAV, that I have never suggested to a customer that they go this route. The integrity of the costing logic is so interweaved, that it is almost impossible to find every place that the code would need to be changed.”

Do any of our readers know of an ISV solution for this request? If so, please comment below.

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.

If you are interested in NAV development, be sure to see our collection of NAV Development Blogs.

Read the "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 
Viewing all 388 articles
Browse latest View live