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, ...
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 354

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)
  • Paolo Cecchelli Profile Picture
    686 on at
    Hi Statics,
     
    I am not a developer but one thing you have to consider are the different scenarios that can happen transaction-wise by using the different Disposition codes available in the system, that can have different effects on the Sales Order transactions:
     
     
    For example in your case what disposition code was used?
     

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 608

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans