Wednesday, July 30, 2014

Sales / Purchase Order Posting

Hi All,

Please find the below link for posting sales/ purchase order and the hierarchy of classes involved in posting

Sales/Purchase Order Posting

Table Inheritance

Use Page Activated metod instead of tabchaged method on forms

Hi All,

Please look into the below link to to know why to use pageactivated method instead of tabchanged

axdaily.blogspot

Opening form from infolog "show" button with a specific record

Hi All,

Please Look into the below link for Opening a form from Infolog "Show" button.
axrachit.blogspot -- opening form from infolog show button

Monday, February 24, 2014

How to get Vendor as a Ledger Dimension in AX

Hi Guys,

Below is the code to get the Vendor Account as Ledger Dimension.....

static void getNonLedgerAccounts(Args _args)
{
    LedgerDimensionAccount  ledgerDim;
    ledgerDim = DimensionStorage::getDynamicAccount("VendorAccount", LedgerJournalACType::Vend);
    info(strFmt("%1 -%2", ledgerDim, DimensionAttributeValueCombination::find(ledgerDim).DisplayValue));
}

Monday, February 10, 2014

IIF expression in SSRS reports in Ax


Hi Guys,

Below is the sample code for IIF expression in SSR Reports

Scenario:
if value is 1 then Sunday should be displayed
if value in 2 then Monday should be displayed
if value is 3 then Tuesday should be displayed.

How to achieve this...?

Solution:

Using IIF

=IIf(Fields!TarifeTipiNo.Value = 1, "Sunday", IIf(Fields!TarifeTipiNo.Value = 2, "Monday", IIf(Fields!TarifeTipiNo.Value = 3, "Tuesday", "Wednesday")))

Using Switch:

=Switch(Fields!TarifeTipiNo.Value = 1, "Sunday", Fields!TarifeTipiNo.Value = 2, "Monday", Fields!TarifeTipiNo.Value = 3, "Tuesday")




Get First and Last dates in a Month.

Hi Guys,

Below is the code to get first and last dates in a month in Ax

//First date of a month.
info(strfmt('First date of this month is  %1', mkdate(1,mthofyr(today()),year(today()))));

//Last date of amonth..
info(strfmt('Last date of this month is  %1', endmth(today())));