Tuesday, 6 December 2016

AX7: Display method

[ExtensionOf(tableStr(InventTable))]
final class AMInventTable_Extension
{
     display ItemName itemName()
    {
        return InventTable::find(this.ChosenItemId).ItemName();
    }
}

build along with base table and customization table.

Friday, 11 November 2016

PRIVILEGES

When creating a new menu item.

NEVER FORGET TO SET THE PRIVILEGES FOR IT ALSO.

Wednesday, 5 October 2016

Contact.TableRelationShipMetadata error thrown


have you ever encounter this error? how you solve it?

Update:

in my case, i forget to set the field in table relation. duh!

Tuesday, 4 October 2016

Value cannot be null or empty. Parameter: _designNodeName error

if you get this error,



Assuming that you are creating a menu item of ObjectType SSRSReport, you have chosen an Object from the list of SSRS Reports, but have forgotten to assign the ReportDesign property.


Tuesday, 27 September 2016

Error executing code: Wrong argument types in variable assignment.

This can be caused by two reasons:

  1. Code is wrong, performing some invalid assignment. (You have to fix the code.)
  2. Code is correct, but your application is not compiled correctly. (You should compile forward FormLetter class, or - because you may have such issues in more places - compile the whole AOT.)

Sunday, 25 September 2016

get main account from financial dimension

hi guys,

ive encountered a task where i need to get the main account from financial dimension entered by user, which have transaction in trail balance.

note that,
financial dimension that linked to the main account could be differ from in the main account.


  1. user can either change the financial dimension when they want to post the transaction or, 
  1. user can changed the financial dimension after the transaction posted, with diffrerent financial dimension.
there is a view where you can get the account and financial dimension used on posted transaction.
'DimensionAttributeLevelValueView'


to do so , i used this select statement,

     select DimensionAttribute
            join DimensionAttributeLevelValueView
                where DimensionAttributeLevelValueView.DimensionAttribute == DimensionAttribute.RecId
                && DimensionAttributeLevelValueView.DisplayValue == 'financial dimension value'
            join DimensionAttributeValueCombo
                where DimensionAttributeValueCombo.RecId == DimensionAttributeLevelValueView.ValueCombinationRecId
            join MainAccount
                where MainAccount.RecId == DimensionAttributeValueCombo.MainAccount;

Happy Coding! :)

Monday, 19 September 2016

Cant debug data provider (DP) class

if you are having trouble debugging DP class,
please check if its using SRSReportDataProviderBase?

if it does extend it,
just for debugging purposes you can use SrsReportDataProviderPreProcess
replacing the SRSReportDataProviderBase.

but to keep using the SrsReportDataProviderPreProcess
you have to change table from temp to permanent.

more details, can be read at
AX SSRS - Regular Processing VS PreProcessing


Friday, 26 August 2016

get current user name

info(strFmt('%1: %2', "Current user: ", xUserInfo::find(false,curUserId()).name));

Monday, 6 June 2016

Error Unable to log on to Microsoft Dynamic AX

the way i solve this problem are

1. make sure filled in the business connector proxy in System administration/Setup/System/System Service Account


2. check your AX configuration. 

both local client and business connector must have connected correct configuration with correct port. 
and also try to refresh WCF services for both.



Error _reportName cannot be null or empty.

if you encounter this kind of error


in this specific case it looks like an earlier full compile did not finish.

i would suggest you to first compile the class mentioned in the error message and see if it solves the problem.


  1. go to AOS.
  2. find classname mentioned in the error message.
  3. compile it.