Thursday, 4 September 2014

Number sequence showing 0000 after upgrade to AX2012 R2 in place.

After doing an in place upgrade from previous version of AX2012 I faced this issue:

When you have a number sequence that is set to continuous and the number that pulls into the form is 000000 and is not a valid number.

This is caused by the Stored Procedure not getting updated when the R2 in place upgrade process is complete.  We suspect that this problem may be due to incorrect steps done during the upgrade that we are not able to reproduce.

To copy out the stored procedure from a working data base you will use the following steps:
  1. Open SQL Server 
  2. Expand Databases
  3. Select your database
  4. Expand Programmability
  5. Expand Stored Procedures
  6. Right Click on dbo. getNumInternal
  7. Click Modify

 9. Select all and Copy the code form the old environment in which the number sequence was working good.

Copy the stored procedure in the R2 environment under the same stored procedure and then you can execute the code by clicking the Execute button.


Please make sure you have a backup of your data base before you try these steps.  You will need to restart the AOS and AX after you have run this code.

This will resolve your number sequence problem.

Hope this helps.

Friday, 29 August 2014

AX 2012 Button click events override not found under Action tab.

In AX2012 I faced the following issue:

I tried to add a new method or override any existing method on CustListPage form, I was not able too as the option was not available. Also I am not able to find how to write method for list page new buttons. I also try button, command button and other but not working. Check below Image


I found out the solution to fix this problem, this problem is a new feature in AX2012 - the ability to use the same list pages both in AX client and on Enterprise Portal. If  I change buttons DisplayTarget property to "Client", then you can override buttons methods - but you can't use that button on EP any more. By default the value of this property is "Auto" as shown below:


Hope this helps.

Friday, 16 August 2013

Report not deploying in AX2012 reporting server(The deployment was aborted. You do not have privileges to deploy to server:. For deployment, you must have administrative rights to the SQL Server Reporting Services (SSRS) server. Contact your administrator to deploy.)

Recently I faced one issue, I was trying to deploy the SSRS report, as soon as I select "Deploy Element" from AX.


Below is the error:

"The deployment was aborted. You do not have privileges to deploy to server: <server name>. For deployment, you must have administrative rights to the SQL Server Reporting Services (SSRS) server. Contact your administrator to deploy."

Then i found out the reason for this issue, you need to give the Administrator rights (in reporting server machine) to that user who is trying to deploy.

  1. Go in Computer management and then select "Local Group and Users".
  2. Now select "Groups". 
    
3.     Double click "Administrator" group and Add your user as shown below.



After doing these steps try depoying report again, the issue will be resolved.

Hope this helps!

Monday, 5 August 2013

Access denied: SubledgerJournalizationController for security roles on product receipt

In AX2012 while working on the security role I faced the following error while product receipt update:

Access denied: SubledgerJournalizationController
An error occurred during update
Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
   at Dynamics.Ax.Application.FormletterService.Run() in FormletterService.run.xpp:line 178
   at Dynamics.Ax.Application.FormletterService.Postpurchaseorderpackingslip(PurchFormLetterPackingSlipContract _contract) in FormletterService.postPurchaseOrderPackingSlip.xpp:line 14
   at FormletterService::PostPurchaseOrderPackingSlip(Object , Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)
   at Dynamics.Ax.Application.SysOperationServiceController.Runoperation(Boolean _async) in SysOperationServiceController.runOperation.xpp:line 93
   at Dynamics.Ax.Application.SysOperationServiceController.runServiceOperation(Object[] parameters) in SysOperationServiceController.runServiceOperation.xpp:line 22
   at SysOperationServiceController::runServiceOperation(Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
   at Dynamics.Ax.Application.SysDictClass.invokeStaticMethod(Object[] _params) in SysDictClass.invokeStaticMethod.xpp:line 26
   at SysDictClass::invokeStaticMethod(Object[] )
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
   at Microsoft.Dynamics.Ax.Xpp.PredefinedFunctions.runAsInvoke(String className, String staticMethodName, Object[] parms, Object[]& exportInfolog)


In order to resolve this issue, you need to give access to the server method, go to user role and browse to the server method node as shown below and then right click and click "New server method" 


Now click on the properties and add the following details:



The class name should be "SubledgerJournalizationOperation" and the method that needs to be added should be "Journalize".

Below is the final output that you will see once you are done:



After adding this the issue will get resolved.

Hope this helps!

Select and un- select multiple records on the grid

I came accross one requirement in which users need to un-select and select multiple records in the grid, For example there are aroung 100 lines in the grid and user want to un select some lines then the manual task was too time consuming. Therefore I added a small customization:


Consider the above example of delivery orders, I go to proforma invoice and click "Select packing slip"


A new form will open


Now you can filter the record based on dates or what so ever


Now you can click on the customized buton as shown below after selected the current records.


This will un check all the selected records in one go and vise versa.

Below is the code for both the buttons for reference.

//This code is for Select All button
void clicked()
{
    CustPackingSlipJour custPackingSlipJourLocal;
   
    MultiSelectionHelper helper = MultiSelectionHelper::construct();
   
    helper.parmDatasource(custPackingSlipJour_ds);
    custPackingSlipJourLocal = helper.getFirst();
   
    while (custPackingSlipJourLocal.RecId != 0)
    {
        journalSelect.included(true, custPackingSlipJourLocal, NoYes::Yes);
        custPackingSlipJourLocal = helper.getNext();
    }
 
    custPackingSlipJour_ds.research();
    super();
}

//This code is for Un-Select all button
void clicked()
{
    CustPackingSlipJour custPackingSlipJourLocal;
   
    MultiSelectionHelper helper = MultiSelectionHelper::construct();
    helper.parmDatasource(custPackingSlipJour_ds);
    custPackingSlipJourLocal = helper.getFirst();
   
    while (custPackingSlipJourLocal.RecId != 0)
    {
        journalSelect.included(true, custPackingSlipJourLocal, NoYes::No);
        custPackingSlipJourLocal = helper.getNext();
    }
 
    custPackingSlipJour_ds.research();
    super();
}

Hope this helps!

Friday, 31 August 2012

AX2009 Server migration from one machine to another

Server migration of AX2009 is easier if you do it through SQL Backup/Restore. Following are the steps:
  1. Go to the SQL server of the database from the where you need to take the backup.
  2. Backup the full database.
  3. Go the the SQL server of the database on which you need to restore the database.
  4. Restore the full database.
  5. Copy the Appl folder from  C:\Program Files\Microsoft Dynamics AX\50\Application
  6. In server configuration you need to point to this application path as shown above.
Now you need to change the server name at the database level from SQL as shown below:

Select * from dbo.BATCHSERVERGROUP
--Update BATCHSERVERGROUP set SERVERID = '01@NewAOS' where SERVERID = '02@OldAOS'

Select * from BATCHSERVERCONFIG
--Update BATCHSERVERCONFIG set SERVERID = '01@NewAOS' where SERVERID = '02@OldAOS'


Select * from SYSCLUSTERCONFIG
--Update SYSSERVERCONFIG set SERVERID = '01@NewAOS' where SERVERID = '02@OldAOS'

Select * from SYSSERVERSESSIONS
--Delete dbo.SYSSERVERSESSIONS
Select * from BATCH
--Update BATCH set SERVERID =  '01@NewAOS' where SERVERID = '02@OldAOS'

Select * from SYSCLIENTSESSIONS
--delete SYSCLIENTSESSIONS

Hope this helps.

Cannot select a record in Customer parameters (CustParameters). An unsupported NULL value has been selected from the database."

Recently our customer came up with one of the issues,  the issue was that some of the users where not able to access the Sales order and Customer master data. They use to get this message:



"Cannot select a record in Customer parameters (CustParameters). An unsupported NULL value has been selected from the database."

The reason was usage data, there was something wrong with their usage data. I tried to clear the usage data and close AX and open again, issue was resolved.

Steps to clear usage data:
  1. Open AX
  2. Go to Tools
  3. Select Option
  4. Click "Usage Data"
  5. In th General tab click "Reset" (Note that all the user changes will be gone after reset).