09.10.2012, 17:11 | #1 |
Участник
|
ax-erp: Modifying CreatedDateTime
Источник: http://microsoft-dynamics-ax-erp.blo...ddatetime.html
============== For testing purposes with the MRP we needed to modify the createdDateTime fields in Dynamics Ax 2009. Since these are system fields we needed a workaround. if(isRunningOnServer() && CurUserId() == "Admin") { new OverwriteSystemfieldsPermission().assert(); salesLine.overwriteSystemfields(true); // "YYYY/MM/DD HH:MM:SS" salesLine.(fieldnum(SalesTable,CreatedDateTime)) = str2datetime( "2010/04/03 11:00:00" ,321 ); salesLine.doInsert(); salesLine.overwriteSystemfields(false); CodeAccessPermission::revertAssert(); } Remarks:
*edit* Easy does it DECLARE @DATAAREAID nvarchar(4) DECLARE @SALESID nvarchar(20) DECLARE @DATETIME datetime /* EDIT THE FIELDS BELOW */ SET @DATAAREAID = 'CEU' SET @SALESID = '00003352_058' SET @DATETIME = '01/01/98 00:00:00.000' /* DO NOT EDIT HERE */ UPDATE dbo.SALESTABLE SET CREATEDDATETIME = @DATETIME WHERE SALESID = @SALESID AND DATAAREAID = @DATAAREAID; UPDATE dbo.SALESLINE SET CREATEDDATETIME = @DATETIME WHERE SALESID = @SALESID AND DATAAREAID = @DATAAREAID; Источник: http://microsoft-dynamics-ax-erp.blo...ddatetime.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|