Wednesday, August 27, 2014

AX2012 SSRS Error "You do not have sufficient authorisation to modify data in database"

Hi Friends,
Recently we got this error on running a SSRS report. For every report we were getting similar error. I was a system administrator so I was sure it should not be a permission issue but the error message was pointing towards permission and security settings. 


I also tried generating full CIL, restarting AOS, restarting SSRS , deleting *.auc files, cleared usage data but still got the same error.

I found technet article on similar error message here and verified that no such properties were changed in our system.

Then we gave a try by rebooting the machine hosting AOS and guess what the reports started working. 

So just rebooting the server helped us in this situation however the error message was pointing towards permission issue. In case you also face similar issue then please try this and also share any other resolutions to this error message which you find.

Thanks.




Tuesday, August 26, 2014

AX2012: SSRS error "Item with the same key has already been added"

Hi Friends,
Recently we faced the below error when running a SSRS report on AX2012 Feature pack CU4 environment:


This was LIVE environment with lots of users logged in, so we wanted to avoid any downtime, and the following helped us to fix this issue without any downtime:
1. Clear *.auc files
2. Restart SSRS server
3. Redeploy the report

There is a blog from MS support team on the same topic here which suggest that only redeployment of the report can fix this issue but in our case we were also required to restart SSRS services.

Thanks.

Friday, July 25, 2014

AX 2012: Merge ledger and financial dimensions using X++ code

Hi Friends,
In this post let us see how to use out of the box available X++ API which can be used to merge ledger and financial dimensions.  The below code works well with AX2012/ AX2012 R2/ AX2012 R3 versions of Microsoft Dynamics AX. This is useful in scenarios when we need to create journal from code and need to merge the dimensions in order to get the correct offset account values.

So to keep it simple, let consider the below scenario:
Customer "2014" in the system is having the below financial dimensions defined on it:



Now let's create a standard AX general journal and on it's journal line, let's select account type as customer, account as customer account "2014" , offset account as Ledger  and then from lookup select ledger account "110101", as shown below:



As soon as you select the ledger account, you will notice that system merges the ledger dimension and the financial dimension and create the complete offset account dimension value with the display value as shown below:



To do this from code, use API serviceCreateLedgerDimension() available DimensionDefaultingService class, it is advisable to merge the dimensions whenever you create journal from X++ code, to make sure the resulting voucher entries are against correct and complete accounts.

static void Job1(Args _args)
{
    RecId   customerDefaultDimension = CustTable::find("2014").DefaultDimension;
    RecId   ledgerDimension = AxdDimensionUtil::getMultiTypeAccountId(enumNum(LedgerJournalACType),LedgerJournalACType::Ledger,[110101,110101]);

    info(DimensionAttributeValueCombination::getDisplayValue(DimensionDefaultingService::serviceCreateLedgerDimension(ledgerDimension,customerDefaultDimension)));
}



Line 1 --> gets the RecID which relates to the financial dimension defined on the customer.

Line 2 --> Get the RecID which related to the ledger account 110101.

Line 3 --> Is actually combining the logic to convert the recID into the display value and also to merge the dimensions.

DimensionDefaultingService::serviceCreateLedgerDimension() --> is the function which merges the dimensions. It takes the ledger dimensions and then the financial dimension which needs to be merged and returns the recID of the merged dimension.

DimensionAttributeValueCombination::getDisplayValue() this function returns the display value of the recID which is passed to it. I have used it here to demonstration purpose only. 

There are many other useful API's existing in this class which can be very helpful in developing customizations which require to use financial and ledger dimensions.
The ledger dimension framework whitepaper can be downloaded from technet using this link.

Thanks for reading the blog and keep sharing. 



Thursday, May 29, 2014

AX2012 : SSRS error - Request failed with HTTP status 401

Hi Friends,
Want to share this scenario:
I started getting this error message when running SSRS report in one of the environment and I was bit surprised that why suddenly I face this error although I was able to run the reports properly 5 minutes back:
 
 
As I was attached to system administer role so I was pretty sure that it was not a security permission issue inside AX. Google search resulting in several links and one of them suggested to log off from the windows and log back in.
On doing that system prompted me that my domain password has expired and must be changed. So I changed the password and then when I ran the report in AX again it executed successfully.
 So in this case, the domain password was expired which resulted in SSSR report execution error.
This might not be a sure shot solution but it worked for me.In case you have also faces similar issue then please do comment on the resolution you found for this.
 
Have a good day.
 
 
 

Thursday, April 17, 2014

AX2012 R2 CU7 - Pallet transports -[Part V - Relocation]

Hi Friends,
In this last part of my pallet transport series in continuation to my previous posts here . I will show how we can create relocation pallet transport in Microsoft Dynamics AX 2012 R2 CU7. These are created to move pallets inside a warehouse from one bulk location to another bulk/picking location. This could be for any reason like any maintenance activity to be carried inside a warehouse or to make some space in warehouse and move goods to another location.

So for illustration let's see on hand on my test item in the system, notice goods are at bulk location for pallet 00000638_114.
Now in order to create a relocation transport, we can right click on the pallet ID and go to Pallet form



 Now go to Functions --> Move Pallet



This will open the move pallet dialog where user needs to select the toLocation where this pallet needs to be moved to.


The list of locations shown in To-Location are based on the logic which can be found in the method findFreeLocations() in table TmpWMSLocation table. It Is based on the location where the pallet is currently available:




Click OK system creates a relocation transport which can be viewed from the pallet transport handling button






 We can now go to pallet transport handling form and follow the normal process of starting the pallet transport and complete it.



Once we complete it, see the on hand of the item and we can see that goods have been moved to another bulk location.



The class used in the above process is WmsPalletMove and the code to create the relocation pallet transport can be found in method createRelocationTransportOnServer().



This was the last blog post in the pallet transports blog series. I hope this will be of help the readers to to understand the basics of pallet transports in Microsoft Dynamics AX 2012 R2 CU7 and it's previous versions.With the upcoming AX2012 R3 release the community is excited to see the new functionalities in the AX WMS portfolio and probably some features are getting changed in this area too.
Till my next blog,....take care and keep sharing :).

Sunday, April 6, 2014

AX2012 R2 CU7 - Pallet transports -[Part IV - Outbound]

Hi Friends,
In continuation to my blog post series on pallet transports, this is the fourth post ,the previous posts can be found at these links (Part I, Part II and Part III ).
In this post I'll be talking about the setup required to create outbound pallet transport in Microsoft Dynamics AX2012 R2 CU7.
An outbound pallet transport is created during shipment reservation and is controlled by the shipment reservation combination for the method Output transport - all bulk locations.
As the name suggest, when goods are lying in bulk locations and shipment reservation combination is running the rule - "output transport - all bulk location", outbound pallet transports are created. The rule means that if goods are lying in bulk locations then create the outbound pallet transport to move them to outbound dock. If there are no goods lying in bulk locations then system will try to reserve based on the rule with next priority and if there is no rule then reservation will fail.

So let;s walk-through this in a standard AX2012 R2 CU7 environment, I have on hand of the item no  "000139_202" in the bulk locations as shown below:




My shipment template is using shipment reservation sequence which uses a shipment reservation combination having Output transport - all bulk locations at highest priority configured in it;s line as shown below:


So now I create a sales order and then an output order which in turn create the shipment of the sales line.Notice the inventory transaction at this point


Now let's run the shipment reservation, at this point system checks the availability of goods at bulk location and as they are available system creates a output transport from bulk location to the outbound dock. Also interesting to see the inventory transactions at this point


We can look at the pallet transport from shipment inquiry >> Pallet transport option.


Now we can activate the  transport and then we can view it on the pallet transports form

Let's complete the pallet transport and then see the inventory transactions of the shipment lines. You will notice that the status is updated to "Picked"


Also interesting to note that system did not created any picking list or picking route in this case as this task has been accomplished by the pallet transport itself.
Technically the magic happens in WMSReservationEngine class which initialize the object of WmsReservation class based on the Reservation method, see below in this case the class created is WMSRreserve_Output


There is lot more to explore and find the hidden jewels of AX in these classes.The method to trigger the creation of output pallet transport is called in reserve()  as shown below:


So we saw in this post how we can configure shipment reservation combination to create outbound pallet transports.

Thanks for reading the blog, keep sharing.

Thursday, March 13, 2014

AX2012 : Removal of suspension of recId allocation for table VendInvoiceInfoTable has failed.

Hi Friends,
Recently working on one environment on AX2012 FP CU4 I got the below error on posting purchase order invoice and the following steps helped to fix the error:
  1. Generate Full CIL
  2. Stop AOS
  3. Delete *.auc files
  4. Start AOS
Before running full CIL, I also tried with generating incremental IL, but that did not helped.























This might not be a sure shot solution but it worked for me.

Keep sharing!!!