Thursday, February 16, 2017

Dynamics AX :: Fancy Dates


There is nothing worse than a bad date... or a bad date problem in AX. I recently needed to perform some date verification in a batch for the previous month. I started to play around with some conversions  but luckily before I wasted a whole day came upon this code snippet from another AX blogger.**

It works like a charm!

For date type:
static void EP_dateMonthInterval(Args _args)
{
    date            fromDate;
    date            toDate;
    date            baseDate = systemDateGet();
    ;
 
    toDate      = dateStartMth(baseDate) - 1;
    fromDate    = dateStartMth(toDate);
 
    info(strFmt("%1 - %2", fromDate, toDate));
}

For UTC Date type
static void EP_UtcdateMonthInterval(Args _args)
{
    UtcDateTime     fromDate;
    UtcDateTime     toDate;
    UtcDateTime     baseDate = DateTimeUtil::utcNow();
    ;
 
    // Remove this month number of days.
    toDate = DateTimeUtil::addDays(
    baseDate, -(DateTimeUtil::day(baseDate) -1));
 
    // Add the rest of this days time minus one second.
    toDate = DateTimeUtil::addSeconds(
    toDate, -(DateTimeUtil::time(toDate)+1));
 
    // Remove the number of days we are on in
    // the previous month and add one second to 
    // get to the first of the month.
    fromDate = DateTimeUtil::addSeconds(
    DateTimeUtil::addDays(
    toDate, -(DateTimeUtil::day(toDate))), 1);
 
    info(strFmt("%1 - %2", fromDate, toDate));
}

**Reference source: http://fourone.se/blog/2012/11/01/date-and-utcdatetime-interval-for-previous-month/

Thursday, August 18, 2016

AXUG AUGUST MEETING - August 24 2016

On the fence about coming to our August 24th meeting?

Wishing that you had just a tad more details about what is going to be presented and discussed?

This post is for you! Lets flesh out the scheduled presentations, shall we?!

AX7 Deep Dive -  Curtis Olive/RSM

  • Come join us for an hour deep-dive into some of the best new features in Dynamics AX "7" that will help drive productivity and collaboration. Curtis Olive, with RSM US will be presenting and showing the details of how to get the most out of the new Workspaces and how they can help make you and your users more productive. He will also talk about all the new searching capabilities that make it easier than ever to find what you are looking for in AX including how to use and contribute to the new Help Wiki. He will wrap up by showing you how to use the new task recorder and task guides which will help make you educate your users quicker and easier than ever before and make it easier for users to learn how to use new features of Dynamics AX.

E-Commerce for Wholesale Distribution & Manufacturers - Giuseppe Ianni/SANA

·         Businesses are improving operations, inventing new models and changing how they engage customers in a digital world. This speaks to both retail organizations and B2B companies, who are at the forefront of this change in regards to how they market, sell and interact with customers. During this presentation we will highlight the growth and key trends in B2B e-commerce and discuss the advantages of implementing an integrated and certified web store for Microsoft Dynamics AX.
The Sana Commerce platform is truly integrated, certified for and installed within Microsoft Dynamics AX to leverage the ERP’s existing data and business logic, and delivers 42 integration benefits out of the box. Working together, Sana and Microsoft Dynamics AX can be leveraged to deliver a web store that will help wholesale distributors and manufacturers reach a global market 24/7, simplify their sales process and increase revenue.
During this presentation, we will highlight:
    • B2B e-commerce trends
    • Meeting the needs of today’s professional B2B buyer
    • E-commerce requirements for B2B organizations looking to take their businesses online by leveraging Microsoft Dynamics AX
    • Sana’s 42 integration benefits

The New Microsoft Ecosystem: Dynamics 365 - Justin Carter/Blue Horseshoe

  • Sometimes Microsoft's can products seem somewhat disperate and confusing to meaningfully tie together as a total solution, so we will get a peek at what is Micosoft's vision for its new Dynamics 365 offering and how can you take full advantage of it with your Dynamics AX implementation.

Thanks all and we hope to see you all next week! Don't forget to register!

Wednesday, May 25, 2016

AXUG Summit 2016 - Big News!

Click here to read a blog explaining the new Microsoft commitment to Summit. In general, this is a very positive step with a caveat... Not to turn Summit into Convergence or some huge move away from the intimate setting of Summits past. Fear not... there are very strong and passionate leaders in the community and on the planning board, such as Kelly Kane and GG Rowe, that have got your back! Much of our last meeting was a discussion on ways to avoid losing the Summit touch.
Some highlights I took away from the announcement:
  • Opening day Keynote from 'Big Dogs" at Microsoft
  • Expanded AX road map discussion with Microsoft Execs
  • Expanded presence of Microsoft support engineers available to answer questions and to be involved at each breakout session for back-up resource.
Please let me know if you have any questions or concerns to pass along to the Summit 2016 planning committee!

Register for Summit 2016
Cheers ~B~

Thursday, May 5, 2016

AXUG Summit 2016 - Session Ideas

{BEHOLD...Blaring sound of Conch shell} (Which, by the way, is made up of a mermaids trill, a sea captains shanty, and the light humming of 1000 narwhals. I digress)
The brave ladies and gentlemen of the committee helping plan the programming sessions for AXUG Summit 2016 need your help! This event is meant to serve the USERS and the best way in which this can be accomplished is to get the USERS involved!
Please take a moment and send an email, make a phone call, or tap an AXUG chapter leader on the shoulder and pass on some ideas for some Seriously Super Summit SessionsAll topics: Master Planning, Upgrades, Finance, Retail... you name it!
If you are ready to take the next step and present, click here to submit a proposal - Summit Proposals
We are looking forward to all of your valuable input! 

Thursday, March 24, 2016

Peter and Robert's XLNT Adventure part TWO

The new X++ compiler and the Microsoft Dynamics AX development platform click to download
The new X++ compiler and the Microsoft Dynamics AX development platform click to listen

Strange things were afoot at the Tech Convention and the Earl of Villadsen and the Duke of Robear were giving us a heavy dose of "Check this out," during the developer sessions!

The X++ code base is not well-structured for larger data sets and VS projects and therefore the concept of loading everything into one project would be unbearable. Now there is an assembly for each package. These assemblies are composed of net modules and PDB files. each NM contains code for artifacts that are similar in nature. This makes for more efficient use.


AX has introduced IGNORE LIST of for code assemblies that push the boundaries of code generation and legacy code.

Wednesday, March 23, 2016

Peter and Robert's XLNT Adventure part ONE

The new X++ compiler and the Microsoft Dynamics AX development platform click to download
The new X++ compiler and the Microsoft Dynamics AX development platform click to listen

Dylan knew something about AX even in the 60's
The times they are a changin', and change they have... the compiler is completely rebuilt from 2012, not one line of code! - Peter V

This has been a four year endeavor to rewrite from scratch in C# by a small team, which expanded, and came up with a set of tools available to us end-using developers.
  • The Visual Studio intellisense engine.
  • The extensible Best Practice engine.
  • The Code Migration tools.
  • Other ad-hoc tools
As an example of the flexibility of the new XLNT, Peter crowed about someone that had used a web-based app to search all of the artifacts in AX7 using XLNT. This is certainly most non-heinous.

Monday, March 21, 2016

eX PLUS PLUS (X++ for those not into phonetics)

The X++ language click to download the slide deck.
The X++ language VIDEO click to watch Peter in his glory.


Mister Villadsen was at again highlighting the NEW X++ language changes during an informative and fun-filled session, yes fun-filled. Where else are you going to get an X++ genius using arcane terms such as "Cludgy" or "Syntatic Sugar?"

I must start with a digression... Did anyone else think that the dude from the stock image on the opening slide looked like a bizarro Kevin Costner? I could not get it out of my mind at each session.

Anyways, X++! If you build it better they will come! As it was with every other P-Vill sesh, this one was standing room only.

X++ does remain the the vehicle for development in the NEW AX with some changes to promote consistency with other langauges, integration with the CIL and some general house cleaning to sweep away quirks and cludgy elements. The goal is to keep X++ familiar enough as to not scare away legacy developers but evolve it in strategic ways to innovate and attract C# dev folk.

All artifacts are now classes. ALL of them. Every last one. Forms? Yep, Classes? Meta and Yep. Queries and tabular objects? Yep and yep. The designer experience is a little flat, flattened on purpose to be view-able on one page. Not sure that I am going to like this change



  • Can now declare variables anywhere in code
  • Can now use ‘var’ variables as a shortcut
  • Will set data type on assignment
  • Static constructors supported