Posts

Showing posts from 2013

Dynamics AX - Retail Scheduler Gotcha

Image
O n a recent project, I ran into a bit of a "gotcha" today around data replication to the Retail POS in Dynamics Ax 2012 R2.  We had created our own schema in order to transfer customized table data to the POS, however, the data would never be written, no matter what we tried.  Before I get to the solution, fist some background on the new Retail Channel Schema in R2. In R2, Microsoft has moved away from a single schema mentality when synchronizing data to the POS.  It is now utilizing a more flexible multi-schema model.  One of the advantages of this model is to allow AX 2012 R2 to seamlessly communicate with both old and new POS versions without issue.  It does this by defining a schema for each version of the POS.  Out of the box, it looks something like this: Notice there are schemas defined for most version of Dynamics AX (this model doesn't support the POS pre-2009).  This will allow the Retail Scheduler to synchronize data between AX 2012 R2 and AX 2009 POS

Dynamics AX - Prompt Dialogs & Don't ask again restoration

Image
D ialogs like these are common.  Coding one in X++ is fairly straight forward. public void prompt() {      if (Box::yesNoOnce( "Title" , "Do you want to blah blah" , DialogButton::No, this .name()) == DialogButton::Yes)     {         info( "Do Stuff now" );     } } The trick here is the "Once" of the yesNoOnce method.  This tells AX to show a dialog with the checkmark, and if selected saves the user's choice... somewhere (voodoo magic).  This is all hooked together by the last parameter: str _owner (set to this.name() in the example).  This links the prompt to a key, which can be anything ("bob", "jaffa cake", etc..).  More info can be found in the documentation . The next time the dialog is code is called, the previous selection is honored.  So in the case of the code above, if the user had selected Yes and chose to not be prompted again, the code within the braces (line 5) still runs, even th