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

Update_recordset not updating as per the where condition

(0) ShareShare
ReportReport
Posted on by 30

Hi,

Below is the code where I have to update the sales order payment for those sales orders whose status is not invoiced and not canceled.


update_recordset salesTable
setting Payment = _TermId
where salesTable.CustAccount == CustTablePaymId.AccountNum
&& ((salesTable.SalesStatus != SalesStatus::Invoiced) !! (salesTable.SalesStatus != SalesStatus::Canceled));

This code is still updating invoiced sales orders. 

  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi Lakshmi, Can you try below code (changing !! with && AND operator).

    update_recordset salesTable
    setting Payment = _TermId
    where salesTable.CustAccount == CustTablePaymId.AccountNum
    && salesTable.SalesStatus != SalesStatus::Invoiced 
    && salesTable.SalesStatus != SalesStatus::Canceled;

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

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 266 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 217

#3
Subra Profile Picture

Subra 164 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans