Sunday, October 23, 2016

New SubMenu or node is not visible for other user right in Module or menu.

Issue:- 

I created a new sub menu named "Customized Report" under "AR- Report"  Path but new folder is not visible for other user rights.

Solution:-

Under privileges go to the entry point and check property "Access Level" is defined properly. If "No Access" is defined then change it according to your need.

Kindly Note - If we are creating a full Role (Including Privileges,Duties,Process Cycles) and assigning the same to an existing role then it could overwrite the existing role. In this case user can face the issues such as Couldn't create edit or delete the Journal or other things. So it's always recommended to  create the Privileges and Duties only for a new customization.

Monday, October 17, 2016

errors in Payroll classes Symmetry dynamics AX 2012 R3 in complication

 After AX installation ,I got very strange errors during compilation  of classes node.
All these classes were belong to Payroll modules.

Most errors described that Symmetry variable is not declare.

Later I discover that reference of ste-net.dll is missing in AOT.
This mysterious dll (mysterious for me) is found at  C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin

We can add  its reference by right click on reference node In AOT


Click on browse and go to  C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin
Select
Select and click on ok

As reference is added into AOT. Compilation errors are gone.

Fix Font Size and Spacing or environment misbehave in Dynamics AX 2012

Issue :- 
Recently when I open AX 2012 R3 the fonts are incredibly large and mismanaged like below screen


You can make a simple change that will help you resolve this issue.  Follow these steps:


  1. Right-click on the icon you use to launch AX and select Properties.Properties in Dynamics AX
  2. Select the Compatibility tab.
  3.  Mark the option called:  Disable display scaling on high DPI Settings.Disable Display Scaling on High DPI Settings. 
  4. Launch AX using the Icon that you just changed the settings for.
You can see that the things normalized.  The navigation menu is much smaller and the area page increased in size.Area Page in Dynamics AX

AX 2012 R3 Kernel build version not changing after installing CU installation and Binary installation ?

Scenario:

I have installed AX 2012 R3 and upgrade he same with CU11 and run binary update also on client . My application version updated immidatily after installation from 6.3.4000.0 to 6.3.4000.123 but kernal version was remain same as 6.3.4000.0.

Note:-  Same error you can face in CU 8 or other version.

Solution;-

To successfully upgrade the kernel you need to upgrade to the latest Report Viewer 2012 and remove the AX Visual Studio Tools if they are installed. Report Version also required CLRType msi so download and install both with same version.

No matter if you are using Multi box installation and updating the client. You have to install both software in client environment also.

Run binary update after that and upgrade the client. Open the environment and check the version.   

Sunday, October 16, 2016

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.

" 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."

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

To add the user in local machine Group follow the below steps.


  1. Go in Computer management and then select "Local Group and Users".
  2. Now select "Groups".


4. Double click "Administrator" group and Add your user as shown below.



After go to the "SQL Reporting Service Configuration Server", go to the server Account and re select the value for Use Another Account field 






Tuesday, October 4, 2016

Create and post new ledger journal in AX 2012 through X++ code

Script for creation and posting of new ledger journal through X++ code.


static void VendPaymJournalCreate(Args _args)
{
        LedgerJournalTable          jourTable;
        LedgerJournalTrans          jourTrans;
        LedgerJournalTableData      jourTableData;
        LedgerJournalTransData      jourTransData;
        LedgerJournalStatic         jourStatic;
        DimensionDynamicAccount     ledgerDim;
        DimensionDynamicAccount     offsetLedgerDim;
        ledgerjournalcheckpost      post ;
        LedgerJournalTable          tablepost;
        ttsBegin;
        ledgerDim = DimensionStorage::getDynamicAccount('V000002',LedgerJournalACType::Vend);
        offsetLedgerDim = DimensionStorage::getDynamicAccount('ABDI316053',LedgerJournalACType::Bank);
        jourTableData = JournalTableData::newTable(jourTable);
        jourTable.JournalNum = jourTableData.nextJournalId();
        jourTable.JournalType = LedgerJournalType::Payment;
        jourTable.JournalName = 'PV16';
        jourTableData.initFromJournalName(LedgerJournalName::find(jourTable.JournalName));
        jourStatic = jourTableData.journalStatic();
        jourTransData = jourStatic.newJournalTransData(jourTrans,jourTableData);
        jourTransData.initFromJournalTable();
        jourTrans.CurrencyCode = 'AED';
        jourTrans.initValue();
        jourTrans.TransDate = systemDateGet();
        jourTrans.AccountType = LedgerJournalACType::Vend;
        jourTrans.LedgerDimension = ledgerDim;
        jourTrans.Txt = 'Vendor payment journal demo';
        jourTrans.OffsetAccountType = LedgerJournalACType::Bank;
        jourTrans.OffsetLedgerDimension = offsetLedgerDim;
        jourTrans.AmountCurDebit = 1000;
        jourTransData.create();
        jourTable.insert();
        tablepost = jourTable;
        ttsCommit;
        info(strFmt("Journal '%1' has been created", jourTable.JournalNum));
    //LedgerJournalTable      table;
    //ledgerjournalcheckpost  post ;
    //;
    //table = //LedgerJournalTable::find("JB0000191");
    post =  LedgerJournalCheckPost::newLedgerJournalTable(tablepost,true,true);

   // post = new LedgerJournalcheckPost::newLedgerJournalTable(table,NoYes::Yes,NoYes::Yes);
    post.run();
    info("Done");

}

Type Of roles and Permissions in SSRS report


In this article, I will show you how to create User Roles and assign roles & permissions to users in SSRS.
Before starting this please go through below details about roles.
The Browser Role : The Browser role is the basic role assigned to users who are going to view reports. The Browser role has rights to perform the following tasks:
  • Manage individual subscriptions
  • View folders
  • View models
  • View reports
  • View resources
The Publisher Role The Publisher role is assigned to users who are going to create folders and upload reports. The Publisher role has rights to perform the following tasks:
  • Create linked reports
  • Manage data sources
  • Manage folders
  • Manage models
  • Manage reports
  • Manage resources
The My Reports Role The My Reports role is designed to be used only with a special folder called the My Reports folder. Within this folder, the My Reports role gives the user rights to do everything except change security settings. The My Reports role has rights to perform the following tasks:
  • Create linked reports
  • Manage data sources
  • Manage folders
  • Manage individual subscriptions
  • Manage report history
  • Manage reports
  • Manage resources
  • View data sources
  • View folders
  • View reports
  • View resources
The Content Manager Role The Content Manager role is assigned to users who are managing the folders, reports, and resources. All members of the Windows local administrators group on the computer hosting the report server are automatically members of the Content Manager role for all folders, reports, and resources. The Content Manager has rights to perform all tasks, excluding system-wide tasks. 
The System User Role The system-wide security tasks have two predefined roles.The System User role has rights to perform the following system-wide tasks:
  • Execute report definitions
  • View report server properties
  • View shared schedules
The System Administrator Role The System Administrator role provides the user with rights to complete any of the tasks necessary to manage the report server. All members of the Windows local administrators group on the computer hosting the report server are automatically members of the System Administrator role. This role has rights to perform the following system-wide tasks:
  • Execute report definitions
  • Manage jobs
  • Manage report server properties
  • Manage report server security
  • Manage roles
  • Manage shared schedules

Assign User Roles and Permissions in SSRS or insufficient permission to Preview Dynamics AX Reports

Before start make sure the user or the user group is added in to the Active Directory. To give the access to a use or user group we have to add the same user or group in to 3 main settings. 


  1. Add Group in to Site setting.
  2. Add Group in to Folder Setting.
  3. Add group in Folder by click Right Side Arrow Click in the folder.
All steps are define below to complete the above task.


Site Setting 

1. First of all open Internet Explorer and go to Report Manager URL which is something like below:
http://Any-Pc/Reports2012
Your browser tab looks like below :

2. Now click on the link of Site Settings which is on the right top corner. Then click on the Security from the left pane. You will see results like below.

Here you will see BUILTIN\Administrators user assigned to System Administrator role.
3.To add New Role Assignment, click on the link of New Role Assignment as Shown in below screenshot.

4. In next screen, Enter the Group or User Name and select role based on your requirement. Please see below screenshot.

Then click on OK button. Here you can see the list of Roles which are assigned to group or users.


Folder Settings-----------------
5. Now click on the link of Home and then click on the link of Folder Settings.

6. You will see results like following.

7. Then click on New Role Assignment and you will see like below screenshot.

In that screen Enter group or user name and select roles as par your requirement.Here we will add Administrator and assign roles of Content Manager & My Reports. Then click on OK button.

Here you can see added role.

Folder Right Click Setting-------------------

8. Click The small arrow beside the DynamicsAX Folder them select Security.

9. Click "New Role Assignment".


10. write the user account on the the group or user name field. then select the Browse Role. then click the OK Button.



That's It ...

If you are following these steps properly then surly you will be able to print the reports on user system.

Monday, October 3, 2016

Remove the "*" in SSRS report Design

Remove the "*" in SSRS report Design...

Many Time we need to convert the amount in to the words but in this case we got the value with some *** . to remove these *** from the value we can use below expression.

=Replace(Left(First(Fields!Field.value , "DatasetName"),Len(Fields!AmountInWords.Value)-10),"*","") + "Only"

we can use the same logic in any value.

Change Row color in SSRS reports Ax2012

In this article, I will show you how to set an alternate row color in Tablix in Report.
1. First of all Open any SSRS report which contains Tablix.
2. Now select Details Row from Tablix.

3. Then press F4 key or manually open property window. In property window select BackgroundColor Property. Then click on arrow button which is on right side and select Expression as shown in below screenshot.

4. An Expression window opens. In that window paste following expression. Then click on OK button.
=IIF(RowNumber(Nothing) MOD 2,”LightGrey”, “LightBlue”)

You can change color as par your requirement. Simply replace color used in above expression.
5. Now run your report. You will see results look like following screen shot:

6. Similarly if you want to change row background color in specific condition like you need to change row background color when Address contains Ct. In that situation use following expression.
=IIF(InStr(Fields!Address.Value,”Ct”)=0,”LightGrey”,”LightBlue”)
Now run your report. You will see output like following screen shot:

Congratulations! We successfully Set an Alternate Row Color in SSRS Report.

Expression with value to be colorful is -

=IIF(Fields!FieldName.Value < 0, "Red", "Black") 

Friday, September 23, 2016

Refresh form A from Form B or by button through X++

Requirement :- Some time we need to switch from a form to another form and have to update delete or create data which will effect the main form also. But the issue we mostly face that the calling form couldn't refresh the data without refresh. Write the below line with your logic can achieve the same.


void clicked()
{
    FormRun                         formRun;
    #task
    super();
    formRun = element.args().caller(); // will hold the calling form buffer

   /* write your Logic here  to execute  in Form B or Form A */


//Write the below code for refresh your calling form A
    if(formRun)
    {
        formRun.task(#taskF5);
    }
}

Conversion of Disposition code, code was not specified - Error in D365 F&O for inter company purchase order return

 We crated the return order for inter company purchase order  and created a Item Arrival Journal through Arrival Overview in corresponding c...