AX 4.0 Database Log for User Group changes

sammcssammcs Member Posts: 2
edited 2008-06-23 in Dynamics AX
Hi, I wonder if anyone can advise ...

Is it possible to record changes to the Administration > Setup > User Groups, within the AX Database Log (Administration > Setup > Database Log) ?

I have seen a suggestion that you can log the changes to the "Administration > Group/user relationships" table and this will give you
what you want, but I can't seem to get this to record any changes at all.

Does anyone know of a way to do this or just get the Group/user relationships logging working ?

Thanks in advance
Sam

Comments

  • MikerMiker Member Posts: 105
    You should add a little cod in validateWrite() method
    some like this appl.logInsert(yourTable)
    see this method in class Application
    void logInsert(Common recordInserted)
    {
    SysDatabaseLog sysDatabaseLog;

    super(recordInserted);

    if (!new DictTable(recordInserted.TableId).dataPrCompany())
    {
    changeCompany('dat')
    {
    sysDatabaseLog.logType = DatabaseLogType::Insert;
    sysDatabaseLog.table = recordInserted.tableId;
    sysDatabaseLog.logRecId = recordInserted.recId;
    sysDatabaseLog.setData(recordInserted);
    sysDatabaseLog.setDescription(recordInserted);
    sysDatabaseLog.insert();
    }
    }
    else
    {
    sysDatabaseLog.logType = DatabaseLogType::Insert;
    sysDatabaseLog.table = recordInserted.tableId;
    sysDatabaseLog.logRecId = recordInserted.recId;
    sysDatabaseLog.setData(recordInserted);
    sysDatabaseLog.setDescription(recordInserted);
    sysDatabaseLog.insert();
    }
    }
    going to Europe
Sign In or Register to comment.