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

Community site session details

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

Get intercompany details of sales order in a single view

(1) ShareShare
ReportReport
Posted on by 8
Hello,
I need to get the intercompany details of a sales order in a single view.
I have created a cross company query for sales line of type sales and status backorder and the related purchase order line needs to be of drop ship delivery type:
However, the view is not returning any records.
 
I have made a T SQL statement in msssql and there are records:
select * from salestable a1, salesline a2, purchline a3
where a1.SALESID=a2.SALESID and
a2.INVENTTRANSID=a3.INTERCOMPANYINVENTTRANSID and
a3.DATAAREAID = a1.INTERCOMPANYCOMPANYID and
a1.INTERCOMPANYDIRECTDELIVERY=1 and
a2.SALESSTATUS=1
and a2.SALESTYPE=3 and
a3.DELIVERYTYPE=1
I have the same question (0)
  • Verified answer
    Waed Ayyad Profile Picture
    9,023 Super User 2025 Season 2 on at
    Get intercompany details of sales order in a single view
     
    Please refer to MS Document:
     
    "In the Application Object Tree (AOT), you can build a view by dragging a query node onto the Data Sources node of your view. The query could have the AllowCrossCompany property set to Yes. However, this will not return cross-company results from the view.

    To return cross-company results from a view, you need to use the crossCompany keyword on the select statement that reads from the view. The AllowCrossCompany setting on the view's data source query is ignored in X++ select statements that read from a view."

     

    Waed Ayyad
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
     

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans