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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

ValidTimeStateUpdateMode error when updating an employee in X++

(2) ShareShare
ReportReport
Posted on by 137
Hi
A question for those with experience
 
I'm working on an idea to input employee information and the data source from the API by X++ code, and I'm trying to update the information of existing employees and input non-existent employees, but this error appears:
 

Cannot edit a record in Person name (DirPersonName). Update on a valid time state table is not allowed without specifying a ValidTimeStateUpdateMode.
What does this error mean?
 
 
 
The code is attached.
 
 
EmployeeIntegrati...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at
    Hi,
     
    and therefore you must specify following line before the update
     
    YourTableObject.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
  • Verified answer
    Raj Borad Profile Picture
    1,570 on at
    Hi,
     
    The solution line provided by Sohaib is useful to solve your error. Use ttsBEgin and ttscommit at starting and ending of the update code to ensure data integrity.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 622

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 553 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans