Wednesday, November 20, 2019

AX 2012 R2 - SSRS - The formatter thew an exception while trying to deserialize the message

This strange error popped up with one of my users the other day while running a report that use on a regular basis:

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SrsReportProviderQueryBuilderArgs'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'SrsReportProviderQueryBuilderArgs' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.'.  Please see InnerException for more details.

A quick google search revealed most people restarting the AOS / SSRS servers to get it to clear out.
Luckily I found this post here.  This solved my problem. 

Tuesday, November 12, 2019

SQl Server SSMS - Get letters from beginning of string

I had a requirement, in SSMS, where I needed to get the first letters of a Voucher string. It could be anywhere from 3-6 letters so I couldn't hard code a start and end point.

I ended up coming up with this:

SUBSTRING([MyCol], 1, PATINDEX('%[^a-z]%', [MyCol]) - 1)

I was able to put a start of '1' as my Voucher letters ALWAYS come at the beginning.  The 'PATINDEX' finds the column AFTER my letters end.  So, I subtract 1 and I've found the end!

Friday, October 4, 2019

Power APPS AX 2012 - New Entity Get Data With Exisiting Connection

Welcome to my very first Power APPS post!!!
My employer has decided to use Power APPS to replace our current T&E in Enterprise Portal.
More posts will come on how I have designed this.

On to the issue at hand...
When creating a new entity I am forced to create a new SQL connection everytime, even though I have an existing SQL connection.
I have an On-premise data gateway and a SQL connection setup:

The 3rd one in the list is a connection created from a new entity.  The blocked out portions of each SQL Server connection are the same name of the SQL Server. 
I couldn't figure out why I couldn't select my existing connection
Here is what I see when getting data for a new entity:



I can successfully select my On-premise gateway, however, no connections show under the Connection combo box.
As I was about to post this on the Power APPS forum I had a small epiphany... By typing in the Server and Database first, it will automatically select my existing connection:

As you can see, we can now use our existing connection and not be forced to create a new one.

Friday, September 6, 2019

GL General Journal Fin Dim (Legal Entity) doesn't auto populate after entering Main Account

After setting up a new Legal Entity, my UAT testers noticed that the Legal Entity portion of the account string in a GL General Journal didn't automatically filled.  That behavior is observed on other Legal Entities that are in the system so it didn't make a lot of sense of why the new Entity didn't have that behavior.



After getting some suggestions on my AX Forum question, I started looking in the Main Accounts and their setup. When looking at the details of a Main Account, I found that the 'Companies' field was not auto-populating:



If you hit that green '+' I can add my new entity, however, I would have expected it to be auto-populated.  I also noticed that the Legal Entity in the Financial dimensions on the Main Account wasn't set either:



As you can see in the image, I was able to set it with my new Entity, however, I would have expected it to be auto-populated after entity setup.

Possible Root Cause:
When setting up my entity I completed the setup in General ledger -> Setup -> Ledger before making the Entity a Virtual Company:

I believe that if you setup the Virtual Company first and then do these Ledger settings the items above will auto-populate.

Thursday, March 7, 2019

Expense Report Accounting Distribution missing Project and Category

Lately, we have had several expense reports get posted with Accounting Distributions that don't account for the Project and Category.  This causes a problem as it doesn't create a Project Transaction like it should.
ER:
Accounting Distribution:
As you can see, the Accounting Distribution fields for Project ID and Category are blank.
Even more interesting, the other 'Hotel' lines and other category lines are just fine. It's only this one.
Not sure at this point what is causing this, but I will update as soon as I have a root cause.

Thursday, January 31, 2019

AX Email Approval - The Requested Workflow Action Failed.

We recently created a new Azure Service using SAS authentication. (Removed the old ACS Service Bus).
It worked initially, however, after a few days we were receiving the following error when trying to approve from the email link:

The Requested Workflow Action Failed.

In order to remedy this I found this blog post which helped:

http://msdynamicsaxtips.blogspot.com/2018/02/the-requested-workflow-action-failed.html

I took some extra steps which I will list out here:

1. Generate Full CIL on AOS which has the Mobile Connector software
2. Stop the RapidStart Services in the Mobile Connector software













3. Deploy the 'SysWorkflowApprovalServiceGroup'
AOT -> Service Groups -> SysWorkflowApprovalServiceGroup


4. Start RapidStart Services in the Mobile Connector software

After doing this, I was able to successfully Approve via email link.

I suspect that Step #3 is most likely what fixed this here, however, I think the other steps could be helpful.