No insert of "Createdate" on customer

Hi Folks, I’m looking at a demo-example of Axapta 3.0. When I register a new customer I cannot find the “Create Date” in the CustomTable. When I look at the “Record Info” I can see there is a field. Questions: - Is the “Create Date”-field not inserted with a date as a standard? - If not. How can I make it happen? - In what table can I find the “Create Date”-field for customer. Thanks! Kenneth/Sweden

Hi Kenneth, Fields like createdDate, createdBy, modifiedDate, modifiedBy are basically system fields. By default these fields are maintained by system. You can view these fields from the table browser. You can access the table browser by - - right clicking on the table and - clicking Add-ins → Table browser. As you may be aware, tables can be accessed from AOT → Data Dictionary → Tables. Please note that these fields can be turned off or on from the table properties. To view properties, please select the table and right click. Also if you want to write your own values into this tables, it is possible. For this you have to use X++. The code will look something like - table.overwriteSystemfields(true); table.(fieldname2id(table, “createdBy”)) = “Joe”; Hope this helps, Harish Mohanbabu

OK Thanks, But I cannot figure out anyway, in my specifik case, the “createdate” of a customer. We want to use this date to “capture” new customers every day. I cannot find any connection to a systable. Can you please be more precise? Thank in advance!

quote:

Hi Kenneth, Fields like createdDate, createdBy, modifiedDate, modifiedBy are basically system fields. By default these fields are maintained by system. You can view these fields from the table browser. You can access the table browser by - - right clicking on the table and - clicking Add-ins → Table browser. As you may be aware, tables can be accessed from AOT → Data Dictionary → Tables. Please note that these fields can be turned off or on from the table properties. To view properties, please select the table and right click. Also if you want to write your own values into this tables, it is possible. For this you have to use X++. The code will look something like - table.overwriteSystemfields(true); table.(fieldname2id(table, “createdBy”)) = “Joe”; Hope this helps, Harish Mohanbabu
Originally posted by Harish - 2005 Feb 18 : 13:42:47

Hi Kenneth, Please note that I mentioned fields like createdDate, createdBy etc are system fields in CustTable itself. For example if you want to find out customers who were created on a specific date, you would typically write something like this -

******************************************
static void Job1(Args _args)
{

        CustTable       CustTable;
        ;

        while select CustTable
        where CustTable.createdDate == 01\01\2005
            {
                print custTable.Name;
                pause;
            }
}
******************************************

As you can see from the above example, you should be able to access those fields like any other fields. Only when you want to write your own value, you would typically use the code that I had mentioned in my earlier response. Hope this helps, Harish Mohanbabu

Ok. I suppose my confusing problems is that THERE IS NO FIELD by the name of “CreatedDate” or “CreatedBy” in the CustTable (not in my demoversion anyway). I’m using Enterprise Manager to look at the tables. Harish, can you please confirm or deny if you have those tables in “your” CustTable in Axapta. Or has this something to do with “the turning off and on” of tables that you mentioned?

Hi Kenneth, Have you turned on the properties of “CustTable” yet. If not please do this - a) Go to AOT → Data Dictionary → Tables b) Select “CustTable” c) Right click and select Properties d) Once you see the properties of CustTable, select properties like createdBy, CreatedDate, createdTime etc and select “Yes”. d) Don’t forget to save CustTable. Now try to create a Customer. Once it is done, if you look in the “Table Browser” under Add-ins, you should be able to see the above system fields populated. Hope this is clear now. Regards, Harish Mohanbabu

Finally i made it! Thanks Harish! I’m new to Axapta and was at the wrong place first. I found AOT (=“Programobjekttrad” in swedish) and managed to turn the fields on.