Pages

Banner 468 x 60px

 

Friday, October 20, 2023

A financial dimension value is based on the LAND-00013 record and has been used on a transaction. You cannot delete the LAND-00013 record AX 2012

0 comments

 A financial dimension value is based on the LAND-00013 record and has been used on a  transaction. You cannot delete the LAND-00013 record


Scenario:

Sometime user trying to delete a record from the customer master or any data that relates to financial dimension. So, user is facing above error upon deletion.

Reason:

Error occurred because data exists in the table DimensionAttributeLevelValue

Solution:

  1. Access the open the table DimensionAttributeLevelValue 
  2. filter the record by Display Value field with the desired record to delete like customer number or employee number etc etc
  3. Select the filtered records
  4. Delete the selected records
  5. Then go back to customer master or where you facing the error
  6. Now try to delete you will be able to delete

AX 2012: you can directly delete the record by opening table

Source : https://dynamicsaxtechstuff.wordpress.com/2015/04/16/how-to-delete-unused-financial-dimension/

Read more...

Monday, October 9, 2023

Cannot create a record in Fixed assets (AssetTable). Fixed asset number: ITH-DEV-4-00838, FA - Hand Held Scanners. The record already exists AX 2012

0 comments

 

Cannot create a record in Fixed assets (AssetTable). Fixed asset number: ITH-DEV-4-00838, FA - Hand Held Scanners. The record already exists AX 2012



Solution :
Go to Organization Administration > Common > Number Sequence > Number Sequence 
find ITH-DEV-4-##### > Status List 

and Delete it.



Read more...

Monday, October 2, 2023

Cannot create a record in Ledger journal table (LedgerJournalTable) AX 2012

0 comments

 

                    General Ledger > Setup > General Ledger Parameters > Number Sequence 
                    > Journal Batch Number > Gene_1


                    Click Status List > File Delete Error 



Read more...

Physical on-hand Inventory Plus Minus without License Plate

0 comments

 


Physical on-hand Inventory 


static void ABUInventTransSolve(Args _args)
{
    InventTrans                     invTrans;
    InventTransOrigin               invTransOrigin;
    InventDim                       inventDim, iDim;

    /*while select invTransOrigin
        where invTransOrigin.ReferenceId == 'TO-000007756' &&
        invTransOrigin.ReferenceCategory == InventTransType::TransferOrderShip &&
        invTransOrigin.ItemId == 'P000371'*/

    select forUpdate invTrans
        join iDim
        join invTransOrigin order by ReferenceId asc
    where iDim.inventDimId == invTrans.inventDimId
    //&& iDim.InventLocationId == 'CNK'
    //&& invTransOrigin.ReferenceCategory == InventTransType::InventTransfer
    && invTransOrigin.RecId == invTrans.InventTransOrigin
    && invTransOrigin.ItemId == invTrans.ItemId
    //&& invTrans.StatusReceipt == StatusReceipt::Purchased
    && invTrans.RecId == 5655505580;
    {
        if(invTrans && WMSLocation::findInventLocation(iDim.wMSLocationId).sortCode > 0)
        {
            ttsBegin;
            inventDim.InventSiteId       = 'JBT';
            inventDim.InventLocationId   = 'CNK';
            inventDim.configId           = InventTable::find(invTrans.itemId).StandardConfigId;
            inventDim.InventStyleId      = InventTable::find(invTrans.itemId).StandardInventStyleId;
            inventDim.InventSizeId       = InventTable::find(invTrans.itemId).StandardInventSizeId;
            inventDim.InventColorId      = InventTable::find(invTrans.itemId).StandardInventColorId;
            inventDim.wMSLocationId      = '0079A-5-8';//ABUTallyLine::findFix(invTrans.ItemId, iDim.wMSLocationId, invTransOrigin.InventTransId).WMSLocationId;
            inventDim.LicensePlateId     = 'CNK-230919-999001';//ABUTallyLine::findFix(invTrans.ItemId, iDim.wMSLocationId, invTransOrigin.InventTransId).WHSLicensePlateId;
            inventDim.InventStatusId     = 'AVAILABLE';

            inventDim                    = inventDim::findOrCreate(inventDim);
            invTrans.inventDimId         = inventDim.inventDimId;
            invTrans.update();

            info(strFmt("%1 Location:%2 LP:%3  Status:%4", invTransOrigin.ReferenceId, inventDim.wMSLocationId, inventDim.LicensePlateId,  invTrans.StatusIssue));
            ttsCommit;
        }
    }

    //info("Done");
}

Read more...

Failed to Find Workflow AX 2012

0 comments

 Failed to Find Workflow AX 2012

Select a.RECID

from SYSWORKFLOWMESSAGETABLE a

Where a.ROOTCORRELATIONID not in

(Select b.ROOTCORRELATIONID from SYSWORKFLOWTABLE b)

and a.MESSAGELIFECYCLESTATE = 1

 

SELECT * FROM SYSWORKFLOWMESSAGETABLE AS A

WHERE A.RECID = 5650958646

 

Update SYSWORKFLOWMESSAGETABLE Set MESSAGELIFECYCLESTATE = 2 where RECID =5650958646






Read more...

Friday, September 29, 2023

X++ Exception: [Microsoft][SQL Server Native Client 11.0][SQL Server]Length of LOB data (5934000) to be replicated exceeds configured maximum 65536. Use the stored procedure sp_configure to increase the configured maximum value for max text repl size option, which defaults to 65536. A configured value of -1 indicates no limit, other that the limit imposed by the data type.

0 comments

 X++ Exception: [Microsoft][SQL Server Native Client 11.0][SQL Server]Length of LOB data (5934000) to be replicated 

exceeds configured maximum 65536. Use the stored procedure sp_configure to increase the configured 

maximum value for max text repl size option, which defaults to 65536. A configured value of -1 

indicates no limit, other that the limit imposed by the data type.



SOLUTION : Change Max Text Replication Size to -1 and Click OK and GO Dance


Read more...

Wednesday, February 15, 2023

Export data from AX to CSV file through X++

0 comments

 TextBuffer          textBuffer = new TextBuffer();

    FileNameFilter      Filter = ["CSV file", "*.csv"];

    FileName            FileName;

    #WinAPI

    LedgerJournalTrans  LocLedgerJournalTrans, TxtLedgerJournalTrans;

    ;

    super();

 FileName = winapi::getSaveFileName(infolog.hWnd(), filter, @"c:\...\desktop", "Save as CSV file","csv","Create Payment Permata");

    if(!FileName)

        return ;


    while select sum(AmountCurDebit), LedgerDimension, OffsetLedgerDimension, CurrencyCode, PaymentMethod, TransDate, BankAccountId, JournalNum

        from LocLedgerJournalTrans

            Group by LedgerDimension, OffsetLedgerDimension, CurrencyCode, PaymentMethod, TransDate, BankAccountId, JournalNum

                order by LineNum

                where LocLedgerJournalTrans.JournalNum == LedgerJournalTrans.JournalNum

                    && LocLedgerJournalTrans.accounttype == LedgerJournalACType::Vend

    {

        textBuffer.appendText(strfmt("%1,", VendBankAccount::findByVendAccount(DimensionStorage::ledgerDimension2AccountNum(LocLedgerJournalTrans.LedgerDimension)).AccountID));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));


        if(LocLedgerJournalTrans.PaymentMethod != PaymentMethod::OVB)

        {

            textBuffer.appendText(strfmt("%1,", VendBankAccount::findByVendAccount(DimensionStorage::ledgerDimension2AccountNum(LocLedgerJournalTrans.LedgerDimension)).RegistrationNum));

        }

        else

        {

            textBuffer.appendText(strfmt("%1,", ""));

        }


        textBuffer.appendText(strfmt("%1,", VendBankAccount::findByVendAccount(DimensionStorage::ledgerDimension2AccountNum(LocLedgerJournalTrans.LedgerDimension)).Name));


        // fixing

        textBuffer.appendText(strfmt("%1,", VendBankAccount::findByVendAccount(DimensionStorage::ledgerDimension2AccountNum(LocLedgerJournalTrans.LedgerDimension)).AccountNum));

        // end fixing


        textBuffer.appendText(strfmt("%1,", LocLedgerJournalTrans.CurrencyCode));

        //textBuffer.appendText(strfmt("%1,", any2real(num2str0((LocLedgerJournalTrans.AmountCurDebit), 0, 0, 1,0)))); //real2int(LocLedgerJournalTrans.AmountCurDebit)));

        //textBuffer.appendText(strfmt("%1,", LocLedgerJournalTrans.AmountCurDebit));


        textBuffer.appendText(strfmt("%1,",Num2Str(LocLedgerJournalTrans.AmountCurDebit, 0, 99, DecimalSeparator::Auto, ThousandSeparator::None)));


        info(strfmt("%1,", any2real(num2str0((LocLedgerJournalTrans.AmountCurDebit), 0, 0, 1,0))));


        select firstFast txt from

            TxtLedgerJournalTrans

                where TxtLedgerJournalTrans.JournalNum == LocLedgerJournalTrans.JournalNum

                && TxtLedgerJournalTrans.LedgerDimension == LocLedgerJournalTrans.LedgerDimension;



        textBuffer.appendText(strfmt("%1,", strReplace(TxtLedgerJournalTrans.txt, ",", "")));

        textBuffer.appendText(strfmt("%1,", ''));

        textBuffer.appendText(strfmt("%1,", vendtable::find(VendBankAccount::findByVendAccount(DimensionStorage::ledgerDimension2AccountNum(LocLedgerJournalTrans.LedgerDimension)).VendAccount).Email));

        textBuffer.appendText(strfmt("%1,", LocLedgerJournalTrans.PaymentMethod));

        textBuffer.appendText(strfmt("%1,", "0"));

        textBuffer.appendText(strfmt("%1,", "0"));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", "PT XXX"));

        textBuffer.appendText(strfmt("%1,", BankAccountTable::find(DimensionStorage::ledgerDimension2AccountNum(LocLedgerJournalTrans.OffsetLedgerDimension)).AccountNum));

        textBuffer.appendText(strfmt("%1,", BankAccountTable::find(DimensionStorage::ledgerDimension2AccountNum(LocLedgerJournalTrans.OffsetLedgerDimension)).CurrencyCode));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", "Jakarta"));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText(strfmt("%1,", ""));


        /*if(vendtable::find(VendBankAccount::findByVendAccount(DimensionStorage::ledgerDimension2AccountNum(LedgerJournalTrans.LedgerDimension)).VendAccount).name() like '*Bpk*)

        {

            textBuffer.appendText(strfmt("%1,", "1"));

        }

        else

        {

            if(vendtable::find(VendBankAccount::findByVendAccount(DimensionStorage::ledgerDimension2AccountNum(LedgerJournalTrans.LedgerDimension)).VendAccount).name() like '*Ibu*)

            {

                textBuffer.appendText(strfmt("%1,", "1"));

            }

            else

                {

                    textBuffer.appendText(strfmt("%1,", "2"));

                }

        }*/


        textBuffer.appendText(strfmt("%1,", "2"));

        textBuffer.appendText(strfmt("%1,", ""));

        textBuffer.appendText("\n");//next row

    }


    if (textBuffer.toFile(FileName))

    {

        info( strfmt("File Generated as %1.Total %2 Lines",FileName,textBuffer.numLines()));

        winapi::shellExecute(FileName);

    }

}

Read more...

Confirm PO Error : The source document lines cannot be finalized until the status is Confirmed in AX 2012

0 comments

 

Confirm PO Error : The source document lines cannot be finalized until the status is Confirmed

SOLUTION : 
Open AOT > Table > BudgetSourceTracking 

In Table BudgetSourceTracking find this PO Number => change the status from Draft to Confirmed
and try to Confirm your PO

Read more...

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH