Tuesday, January 31, 2012

ReleaseUpdateScripts Table in AX 2009

Hi,
   In AX 2009 you can use the  ReleaseUpdateScripts table which contains all upgrade scripts to be scheduled for execution during the Data Upgrade process.

Following is the code to check the "garbase" in the ReleaseUpdateScripts table :


static void CheckGarbaseDemo(Args _s)
{
ReleaseUpdateScripts    releaseUpdateScripts;
Counter                 total;
Counter                 invalid;
;
while select ClassID
    from    releaseUpdateScripts
    group by ClassID
{
    total++;
    if (classid2name(releaseUpdateScripts.ClassID) == '')
    {
        info(int2str(releaseUpdateScripts.ClassID));
        invalid++;
    }
}
info(strfmt(@"Garbage Found %1 invalid classIds out of %2", invalid, total));
}

No comments:

Post a Comment

Thanks for your time reviewing this blog.