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