web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Valid Time State Tables and Date Effective Data on custom table dynamics ax 2012.

Ali Zaidi Profile Picture Ali Zaidi 4,657

Hi all, today I have very small tip, I have inject some data on one of custom table written by some different team.  But update throw exception

 Update on a valid time state table is not allowed without specifying a ValidTimeStateUpdateMode

 

 

Table is custom I update the required filed by following code snippet.

Suppose table name is “Xyz”.

 

 

 

 

select forUpdate * from xyz where xyz.recid== _RecId ;

try {

ttsBegin;

_Value= “Abcd”;

xyz.Name = _Value;

xyz.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);

xyz.ValidFrom =today();

xyz.ValidTo=dateMax();

xyz.update();

ttsCommit;

}

catch

{

ttsAbort;

}

Comments

*This post is locked for comments