Timestamp a field

Hi,

Does anyone know if its possible to timestamp a field in SAGE CRM or run a report to see when that field was last updated? Basically, in the company screen, I have some fields which I want to know when they were last updated by a user.

I have had a look but cannot seem to find an answer. If its possible to do a report that's also fine but what I would like is for when the filed is updated and then saved a 'last updated' field relating to the field is automatically updated with the date.

Many thanks

Jen

  • 0

    Jen

    Sage CRM does not include a track record of changes to the field data. The partial exception to this is in tables that use a progress table to copy the changes that are made to data over time using workflow. This is only the case for four entities in the default system:

    Leads

    Solutions

    Cases

    Opportunities

    Synchronization of data with Sage CRM tables would therefore become Row based. Because we can see only that the table row has changed it will mean the management of conflicts becomes very important.

    If you want to log the changes to a field then you will need to do this yourself.

    The example below only needs to log which fields have changed not every field in the screen so we first need to know what fields are in the screen and then examine each field in turn. To do this I've used the fact that the screen object (EntryGroup block) is an enumerable object.

    Example Validation Log Script

    var ForReading = 1, ForWriting = 2, ForAppending = 8;

    var TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0;

    var mySystemObject = new ActiveXObject("Scripting.FileSystemObject");

    var myFile = mySystemObject.GetFile("c:/customlogs/TEST.TXT");

    var myFileTextStream = myFile.OpenAsTextStream(ForAppending, TristateUseDefault);

    var oldName = "";

    var myBlock = CRM.GetBlock("CompanyBoxLong");

    var myE = new Enumerator(myBlock);

    while (!myE.atEnd())

    {

    oldName = CRM.GetContextInfo("company",myE.item());

    if (oldName != Values(myE.item()))

    {

    myFileTextStream.WriteLine(oldName +"/"+Values(myE.item())+" changed by "+CurrentUser.user_logon);

    }

    myE.moveNext();

    }

    myFileTextStream.Close();

  • 0

    Thanks Jeff! I don't think I will look at changing log files, if it was a simpler solution it would have been ok. may thanks again for your answer though