Pages

Banner 468 x 60px

 

Saturday, November 18, 2017

Takeout License using x++

0 comments
Takeout License using x++ :

//Job exports Dynamics AX license information to a license file

static void Adit_ExportLicenseFile(Args _args)
{
    SysConfig   sysConfig;
    AsciiIO file = new AsciiIO("c:\\license.txt", "W");   //TODO: 1. Ashok define file name and path
    ;
    file.read();
    file.write("LicenseVersion 2");
    file.write("");
    select sysConfig
    where sysConfig.configType == ConfigType::LicenseName;  // SET FOR AX 2009 version
    file.write(strFmt("License #%1", sysConfig.value));
    file.write(" Properties");
    select sysConfig
    where sysConfig.configType == ConfigType::SerialNo;
    file.write(strFmt("  Serial #%1", sysConfig.value));
    file.write(" EndProperties");
    file.write("");
    file.write(" Codes");
    file.write("");
    while select sysConfig
    order by id
    where sysConfig.configType == ConfigType::AccessCodes &&
          sysConfig.value != ""
    {
        file.write(strFmt("  CodeLine #%1", sysConfig.id + 1));
        file.write(strFmt("    Value #%1", sysConfig.value));
        file.write("  EndCodeLine");
        file.write("");
    }
    file.write(" EndCodes");
    file.write("");
    file.write("EndLicense");
    box::info("Done!");
}


0 comments:

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