Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, April 12, 2022

Iterate the Error/ info log using Enumerator in AX 2012/ D365 F&O

Hi,


 SysInfologEnumerator sysInfologEnumerator;

    SysInfologMessageStruct sysInfologMessageStruct;

    Exception exception;

    checkFailed("Warning Msg");

    error("Error MSG");

    info("Info Msg");

    sysInfologEnumerator = SysInfologEnumerator::newData(infolog.cut());

    

    while (sysInfologEnumerator.moveNext())

    {

    sysInfologMessageStruct = new SysInfologMessageStruct(sysInfologEnumerator.currentMessage());

    exception = sysInfologEnumerator.currentException();

    info(strFmt("Msg type: %1; Message: %2",

        exception,

        sysInfologMessageStruct.message()));

    } 


Regards,

MAI

Sunday, August 29, 2021

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot drop the index [table Name.Index] because it does not exist or you do not have permission.

 Hi,

Error: 

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot drop the index 'WORKFLOWTRACKINGTABLE.IX_WORKFLOWTRACKINGTABLE_WORKFLOWTRACKINGSTATUSTABLE_PARTITION_TRACKINGCONTEXT_TRACKINGT', because it does not exist or you do not have permission.

Impact:

Results in synhronization failure.

Resolution :

1. Table a backup of the DB.

2. Delete the particular index from SQL side and synchronize the respective table in application.


Regards,

How to invoke and iterate List as Contract methods in AX 2012/ D365

Hi, Public void performContractIterate(ClassContainsListAsContract    _ListCarryClass) { List contractFieldList = new List(Types::Class); ...