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!