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

Announcements

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 132
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,668 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,578 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Subra Profile Picture

Subra 422

#3
Martin Dráb Profile Picture

Martin Dráb 289 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans