Thursday, January 30, 2014

SOLVED: SSRS report deployment error in AX 2012


We often encounter the following error while trying to deploy the standard AX 2012 SSRS reports. 

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

This error is basically because of some Admin rights issue. Figuring out a solution for the error can be a task, rather we can follow the following workaround. Though its not a best practice/recommended, but it works.

Solutions:

Try the following command while publishing the default reports

For All Reports : "Publish-AXReport -ReportName * -SkipReportServerAdminCheck"
For Single Report : "Publish-AXReport -ReportName CustTransList -SkipReportServerAdminCheck"

Hope this helps.

Tuesday, January 14, 2014

SOLVED :"Illegal data conversion from original field : unable to convert data types to anything but character field type." Ax 2012 / Synchronization

"Illegal data conversion from original field : unable to convert data types to anything but character field type." 
We often encounter this error while trying to full / partial synchronize database from AX 2012/ Ax 2009 to SQL. I have been trying to figure the exact cause of this error for a long time. But the workaround as suggested by a few in the blogging world which also helped in my case is :

System kernel table : SQLSYNCINFO

This table accumulates the sync issues , and are not reconsidered, which means that old errors which were not solved, or errors of tables dropped still remain in this info table.

truncating this table data from sql and resynchronizing the entire db again from AX helped me get over the problem.

Steps i followed :
1.  Stop AOS
2. So go Sql Management Studio
3. Navigate to SQLSYNCInfo table, and delete the unwanted table records.
Alternatively, also truncating the entire table helps

SQL Management studio, run the following query on the DB

truncate table SQLSYNCINFO.

Thursday, January 9, 2014

SOLVED : Dynamics AX 2012 R2 CU7 Installation error / DMF

When I try to install CU7 on a CU6 environment, an error appears when the new models are being imported. Check the log and there is this message:

"Error updating model database: Microsoft.Dynamics.Setup.AxSetupException: AxUtil call returned errors:The model contains a customization of a configuration key. The model cannot be imported because you can overlayer a configuration key from the patching layer only. "

Installation guide for Cumulative Update 7 (link) also warns to uninstall DMF before upgrading to CU7. This is because CU7 has DMF already now a part of the AX installation after CU 7. So if you have DIXF/DIEF installed as the stand-alone package after it went out of beta and was renamed from DMF, you should delete the corresponding AX model.
CU7_DIEF1

When you try to install without removing the model you can certainly expect this error:
CU7_DIEF2
The log file will give you the next details:

"The model contains a customization of a configuration key. The model cannot be imported because you can overlayer a configuration key from the patching layer only."

Solution:
Uninstall DMF for CU6 from Control panel / axutil

axutil delete /model:"Data Import Export Framework" from CMD .
Reinstall CU7

Monday, January 6, 2014

X++ : Filter Enum Values on Form lookup Ax 2012 / Ax 2009


Often there are requirements/ design changes, where we need to filter and display on a few enum values in a Form lookup, For this purpose we can use the following code.
This code basically filters the enum based on the values from Set.


public class FormRun extends ObjectRun
{
    SysFormEnumComboBox         sysFormEnumComboBox;
    Set                         enumSet;// = new Set(Types::Enum);
}
In init method :

enumSet= new Set(Types::Enum);
    enumSet.add(MetalType::Gold);
    enumSet.add(MetalType::Silver);
    enumSet.add(MetalType::Palladium);
    enumSet.add(MetalType::Platinum);

    sysFormEnumComboBox  = sysFormEnumComboBox::newParameters(element,element.controlId(formControlStr(TTMetalRateCreate,acunder)),enumNum(MetalType),enumSet);



Hope This Helps
happy Daxing.

Solution : MOD function ax 2012/ ax 2009 for real Values.


If we need a mod function that we can pass a real values... we can write our own method like this:

Navigation Path:
AOT > Classes >  Global > Create a new Method:



real RealMod(real a, real b) 
{
    ; 
    return (a - ((trunc(a / b) * b))); 
}

Hope this helps all you guys there. :)
Happy Daxing.

Sunday, January 5, 2014

SOLVED : "NO DEVICE ERROR" when starting AX2012 / AX2009 Client.

Hi All,
We often see that  the infolog pops-up with an error message:
'No Device'

This error message is displayed when opening the AX client with the Configuration Key "Telephony Integration" enabled.

This error message is caused by the ActiveX component for the phone integration on form smmPhone which returns an error for each phone device which is offline.




The solution to this error is disabling the Telephony Integration which we generally never use.
Steps are as follows :

  1. Click System administration > Setup > Licensing > License configuration.
  2. In the License configuration form, expand the Sales and marketing series node, and then UNSelect/Unmark  the Telephony integration check box.
  3. Click Apply.
  4. Close AX Client and restart. Kudos !! No Infolog. 
Happy Daxing , Please provide feedback / other solutions, if it helps :)