Skip to content

ArcherPoint Dynamics NAV Developer Digest - vol 197ArcherPoint'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.

Microsoft Acquires GitHub

The developer community is up in arms with the recent announcement that Microsoft acquired GitHub for $75B. While there are many complaints and a general lack of trust of Microsoft based on past history, more recent history under Nadella suggests that Microsoft now embraces the open source model. Check out the Ars Technica article, Everyone Complaining about Microsoft Buying GitHub Needs to Offer a Better Solution for more details.

Where to Put the Logic and the MVC

Kyle: I think I already know the answer, but here is my question of the day. 
 
I write a brand-new custom table. I need to put some logic in that table. Should I put the code directly in the table, or should I create lots of event publishers and make a subscriber codeunit? 

Tim L: Good question. I'd say put it in a codeunit.

Matt T: Six in one hand, half-dozen in the other. If it's a custom table, there is no need to use events, though. You use events because you're trying to "interrupt" or "override" some other process for the most part.

Michael: I like logic going into a related codeunit because it's an easier update when changes need to roll into production. Functions are named like: OnValidateItemNo and those calls are placed in the table.

Jon: On the table, especially when updating the Rec. I urge every developer to learn this pattern: MVC (Model-View-Controller). This topic (where to put the data handling/business logic) is revealed in the goal of the MVC Pattern. It's been around since the 70's and will be prevalent and necessary in future VSCode.

Just for Fun – Solve Einstein’s Riddle

Gwendolyn Britt is training our interns on NAV consulting and shares with the team, “Our interns impressed the heck out of me today. They were able to solve Einstein's riddle in 20 minutes! Can you?”

The situation

  1. There are five houses in five different colors.
  2. In each house lives a person with a different nationality.
  3. These five owners drink a certain type of beverage, smoke a certain brand of cigar, and keep a certain pet.
  4. No owners have the same pet, smoke the same brand of cigar, or drink the same beverage.

The question is: Who owns the fish?

Hints:

  • the Brit lives in the red house
  • the Swede keeps dogs as pets
  • the Dane drinks tea
  • the green house is on the left of the white house
  • the green house's owner drinks coffee
  • the person who smokes Pall Mall rears birds
  • the owner of the yellow house smokes Dunhill
  • the man living in the center house drinks milk
  • the Norwegian lives in the first house
  • the man who smokes blends lives next to the one who keeps cats
  • the man who keeps horses lives next to the man who smokes Dunhill
  • the owner who smokes BlueMaster drinks beer
  • the German smokes Prince
  • the Norwegian lives next to the blue house
  • the man who smokes blend has a neighbor who drinks water

Einstein wrote this riddle and said that 98% of the world could not solve it.

 

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: 
Read ArcherPoint's Blog Follow us on Twitter Follow us on Facebook Follow us on LinkedIn Link to our RSS feed Join us on Google+ Watch us on YouTube
Get Help Now