Wednesday, August 31, 2016

AX POS Error: Step 4: Creating Device Token failed

When I was trying to activate a cloud POS (CPOS) terminal, I was getting the error: 'Step 4: Creating Device Token failed' or something similar to that. I didn't take a screen shot of the image unfortunately. But it was similar to that.

The error is because the CPOS wasn't able to hit the AX '7' database. The CPOS uses a single AxDB database, in my case in the 'all in one' server, which the CPOS needs to have access to.

The environment was the AX 7 Update 1 using upgraded data from the AX 7 RTW release.

The Update 1 data changed in regards to some setup information. Event Viewer gave me some information into this essentially saying that the axruntimeuser wasn't able to access the DB. This, among other things, led me to believe the channel database setup was wrong.

To reconfigure the channel database 'connection string', you'll need the connection string (duh). I used Visual Studios Server explorer to create a connection to the database with the AxDB database for the CPOS, then clicked 'Properties'. The connection string will be right there. (Figure 1)

Paste this value into the appropriate connection string (Figure 2). Mine was the 'Default' one. Run the 1070 job (I think that's the channel job... if not, run that one).

You'll need to cycle the Retail Server application pool also (Figure 3 below).

There were a few other random settings I had to change from RTW configs to update 1 but the above was the main one. I think there were only 3-4 other places.

Hopefully this helps someone else jump past this issue!




Monday, August 29, 2016

Project Maderia Updates

Project Madeira is a new Office 365 product which is aimed as a SMB (Small-Medium sized Business) ERP offering based on Microsoft Navision (as you will see from the default demo Cronus data :-) )

Its still in Beta and not officially implemented as a 'Release to Web' (RTW) version (as of August 2016) so there are constantly changes being made on a monthly basis. It can be hard to keep up, especially if you are working on ISV extensions to the product.

Make sure to book mark the below link to see an actively updated list of what is new to the product on a month by month basis. Very informative!!

What's New in Project "Madeira"

Thursday, August 11, 2016

AX 2012 R3 Retail Error when running a retail distribution job: 'Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics'

[Going through old notes in my retail folder and posting here]
I was attempting to run a Retail Data Distribution job in AX 2012 R3 to a POS and got the below error. It was 'Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics'. I recently ran the generate classes and create staging tables functions so there was new code in place. 

I did a little debugging as the error was not retail specific and it was odd it was being thrown where it was. Sure enough, the CIL wasn't recognizing my current user which is why it wasn't working... Obviously this isn't a bug but rather something within AX. Come to find out, I had previously built the classes and staging tables for the jobs in the USR layer, deleted them, then rebuilt them in the proper layer/model. That threw some issues into the system.

A compile, usage data clear allowed me to get the new error in Figure 3. Obviously that told me to do a full CIL build. I did that, problem solved!

 Figure 1 - The error in question

 Figure 2 - Line 51 is where the error was being thrown.

Figure 3 - The actual error in question. Its actually quite helpful!

Tuesday, August 9, 2016

Dynamics AX 2012 R3 Retail Error when running Distribution schedule job: 'Class RetailCDXChannelSpecificData_AX63 does not exist

Are you getting an error when attempting to run an AX 2012 R3 Retail data distribution scheduler job (Figure 1)? Is it 'Class RetailCDXChannelSpecificData_AX63 does not exist'? Does it look like the one in Figure 2 below? Do you like things actually working correctly? Hey, friend! If your answer was Yes to the questions above, I might be able to hook you up.

To fix the issue, navigate to the Retail Channel Schema (hint: its on the Scheduler job setup in the field 'Retail Channel Schema'. You can right click on this field for the job in question and go straight to the record and form to generate those magic classes the error has told you all about.

NOTE: This process will generate code in AX AOT so you'll want to be in the correct layer/model for this process

When you click 'Generate classes' (Figure 3), you'll be prompted to what it will do (Figure 4) so make sure you are in the right layer and it will generate the classes you need as you'll see in the AOT (Figure 5).

You will need to do the Incremental CIL build after this or you may get weird issues, but I always do a full as I still don't trust the incrementals from earlier experiences.

Figure 1 - Running the Data Distribution Scheduler job manually

Figure 2 - A delightful little nugget of goodness raining on your parade

Figure 3 - The 'Generate classes' button in the Retail Channel Schema form

Figure 4 - The confirmation for generating the scheduler job classes

Figure 5 - The classes generated in the AOT

Figure 6 - Go grab a beer and celebrate. Or get back to work...


Monday, August 8, 2016

Dynamics AX 2012 R3 Retail Error when syncing metadata: 'The table [Table] does not exist'

You may see the error 'The table NoSaleFiscalDocumentTransaction_BRT does not exist' when attempting to sync the metadata via the 'Sync Metadata' (Figure 1) in AX 2012 R3 Retail (Figure 2)

This is because the temporary table for the tables in question need to be run. The '...T' at the end of the error (.._BRT in this case) indicates its temporary for the main table. The tables where these are created are determined through the subjobs for that PJob. So you'll need to do this when you add tables to sync back/forth between the POS and AX.

You generate these temporary tables by clicking on the 'Create staging table' button in the scheduler job form (Figure 3). You only need to do this for 'Pull' type schedule jobs. You can determine which these are via the 'Is Upload' check box. Best practices dictates that your Pjobs should always be named with the prefix 'P-...' if the 'Is Upload' box is checked.

NOTE: When you click 'Create staging table', there are AOT objects created. Make sure you are in the correct layer/model where you want these created.

Upon clicking on the 'Create staging table' button, you will see the information in Figure 4. The tables are created in the AOT. You can verify if you want. Then go back and hit the 'Sync metadata' button and you'll see the successful sync in Figure 5.

Figure 1 - 'Sync metadata' button on the Retail Scheduler parameters

 Figure 2 - The Error thrown when attempting to sync the metadata

Figure 3 - The P-Job with 'Create Staging table' button

Figure 4 - The TempDB tables created from 'Create Staging table' button

Figure 5 - What you see when you successfully sync metadata