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

Notifications

Announcements

Community site session details

Community site session details

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

SRS Report showing duplicate SalesLines for Return Orders due to Invoiced/Open status

(0) ShareShare
ReportReport
Posted on by 304

Hi everyone,

I am developing a custom SSRS report for Return Orders. I have encountered an issue where the report displays duplicate lines for the same item, even though the 'All return orders' form shows only a single line.

After investigating via Table Browser, I found that the SalesLine table contains two records for the same SalesId and ItemId:

  1. One record with SalesStatus::Invoiced

  2. One record with SalesStatus::OpenOrder

Both records appear to be related to the same transaction.

Current Logic:
In my class, I am using MultiSelectionHelper to get the selected SalesTable and then fetching lines using a simple 'while select' based on SalesId.

Question:
What is the best practice to filter out these 'duplicate' records to ensure the report matches the UI? Is there a standard method like salesLine.isReturnLine() or a specific field I should use to identify the "primary" line?

Any suggestions would be greatly appreciated.


I have the same question (0)

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 332 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 238 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans