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

How to open Sales Order page of an order from another table's page having a non-primary key field which have the No. of Sales Order

(0) ShareShare
ReportReport
Posted on by 75

I have a table whose field contains a No. of a Sales Order Record.

Annotation-2019_2D00_04_2D00_18-180518.png

I want when a user clicks that , Sales Order Page of that Specific No. opens up.
Please help me out ?

Categories:
I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Set the TableRelation property of the Sales Order No. field to the Sales Header table (where Document Type = Order).

  • Umar Khokhar Profile Picture
    75 on at

    I've tried this,
    o2.PNG

    this

    o2.PNG

    and this

    6740.3.png

    in the Last Screenshot the fields which Intellisense is showing are form current table not from "Sales Header" that's why i can't select "Document Type"::Order.
    What should i do now ? 

  • Krzysztof Bialowas Profile Picture
    500 on at

    Hi,

    It should be like this:

    TableRelation = "Sales Header"."No." where ("Document Type" = const(Order))

    Best regards,

    Krzysztof

  • Umar Khokhar Profile Picture
    75 on at

    Thanks You Very Much Krzysztof Bialowas & Stefano Demiliani for your kind help. But using this statement

    444.png

    Order is getting accessed only on card page

    222.png

    When i click on the primary key of this table on list page, the cards page gets open.

    What i want is that On the List page when i click on the Sales Order No.
    The Sales Order Card Page of that No. gets open.

    1111.png

    444.png

    is there any way to do that?

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    The UI has a standard behaviour. The first field you mention as “clickable” it seems a flowfield. A field with a table relation instead opens the related record in a list and from here you can open the card.

    If you want a different behavior, you should handle OnLookup event via code and from here retrieve the Sales Header record and open its card page.

    I always suggest to use the standard UI behaviour because the entire system works in a consistent way and your page should be compliant to the UI standards.

  • Umar Khokhar Profile Picture
    75 on at

    I've Tried this

    8831.Capture.PNG

    and getting this error

    8831.Capture.PNG

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