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 :
Business Central forum

Table relation to sales orders and document type

(0) ShareShare
ReportReport
Posted on by

Hi All

Creating my first extension. I've added a table called SalesOrderLoads and the PK is SalesOrderNo, LoadNo, SeqNo

Everything works, but the sales order lookup shows quotes, orders and invoices. I only want sales orders to show

my table relation is defined as  

TableRelation = "Sales Header"."No." where ("Document Type" = Filter (Order));
it still shows all doc types.
Can anyone point me in same direction
Thanks
Mark
Categories:
  • Suggested answer
    Avinash B Profile Picture
    1,455 on at

    Hi 

    instead of filter use const.

  • Community Member Profile Picture
    on at

    thanks for reply, but I don;t know how to do that either

  • Suggested answer
    Suresh Kulla Profile Picture
    50,280 Super User 2026 Season 1 on at

    Set like this

    TableRelation = "Sales Header"."No." WHERE("Document Type" = CONST(Order));

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans