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 :
Microsoft Dynamics AX (Archived)

validtimestate in update_recordset query

(0) ShareShare
ReportReport
Posted on by 4,074

I know you can use the validtimestate(asOfDateTime) property on an X++ select statement to query for records valid on a given date/time, but can you do it on a join?  I am updating a record set, which has the syntax:

update_recordSet myRecordSet

setting

myRecordSetProperty = myTableJoin.Field

join myTableJoin

   where myTableJoin.IdField == myRecordSet.IdField;

I need to do this update/join under the context of a valid date time, and was wondering if I can inject the validtimestate like in a select statement.  

Thanks!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    As per my understanding validTimeState is not allowed in when Update_RecordSet and Join statement

    To implement may be you need to implement your logic with

    WHILE SELECT statement

    Please verify

  • Andy Adamak Profile Picture
    4,074 on at

    I kinda figured as much.  I just implemented the same logic behind the validTimeState qualifier by adding where clauses instead.  Seemed the cleanest approach to me.  This would go away for me if they ever fix the 'cannot insert NULL' issue when inserting a record set with an outer join (see this thread: community.dynamics.com/.../246568.aspx)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans