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 :
Small and medium business | Business Central, N...
Answered

How to auto prefill line type on Sales Order?

(0) ShareShare
ReportReport
Posted on by 35

Hello,

I came across an instruction video (https://usedynamics.com/business-central/sales/creating-orders/) in which the Sales Order page is shown. In the page shown the Type of the first line to be entered is prefilled with 'Item'. In my Sales Order page the lines are all blank. Is this s.th. that can be setup? I'm on BC14.

With kind regard,

Ortwin

I have the same question (0)
  • Marco Mels Profile Picture
    on at
    RE: How to auto prefill line type on Sales Order?

    Hello,

    docs.microsoft.com/.../sales-how-work-standard-lines

    Thanks.

  • Ortwin Profile Picture
    35 on at
    RE: How to auto prefill line type on Sales Order?

    Hello Marco,

    Thanks for the reply.

    The 'Recurring Sales Lines' is not quite what I am looking for.

    In the video you can see that the Line Type is filled with 'Item' at the moment the page is opened. There is not even a customer selected.

    It looks like a global setting of some sort, but I'm not grasping it.

  • Suggested answer
    jerome77 Profile Picture
    on at
    RE: How to auto prefill line type on Sales Order?

    Hi

    I did quick test with my Saas 16.1 version and I have it displayed (not special setup done)

    pastedimage1591869391542v1.png

    Kind regards

    Jerome

  • Suggested answer
    ArturV Profile Picture
    225 on at
    RE: How to auto prefill line type on Sales Order?

    Hi,

    You can subscribe to the OnNewRecordEvent event of page Sales Order Subform and put the following code in here:

    LOCAL [EventSubscriber] OnNewSalesOrderLine(VAR Rec : Record "Sales Line";BelowxRec : Boolean;VAR xRec : Record "Sales Line")

    Rec.Type := Rec.Type::Item;

  • RiteshKS Profile Picture
    260 on at
    RE: How to auto prefill line type on Sales Order?

    Hi Ortwin,

    System keeps most used value in default. if you create most of the orders for items it should keep item as default in line.

    thanks.

  • Ortwin Profile Picture
    35 on at
    RE: How to auto prefill line type on Sales Order?

    Reply from Sune Lohse (creator of the video):

    I can see in the coding that it is determined by the “Application Area”. That is, if the Application Area “Basic” or “Suite” is checkmarked in the system, the line will default be “Item”.

     But I don’t know much about the application areas, and how this checkmark is set… so you will have to find out that 

  • Verified answer
    Ortwin Profile Picture
    35 on at
    RE: How to auto prefill line type on Sales Order?

    You're absolutely right. However I do not manage to set the Application Area(s) in the Web or Roll Tailord Client for all checkboxes in the Application Area page are disabled. Neither do I manage to set the Application Area programmaticaly (Session.ApplicationArea('#Basic')).

    The only way I succeed to set Application Areas is by directly checking them in the table 9178 Application Area Setup.

    And indeed then the first Sales (and Purchase) Order Line is prefilled with Type 'Item'. Now let's hope that the rest of the application still works as before since I toggled the Application Area.

    Thanks for your help.

    Ortwin

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: How to auto prefill line type on Sales Order?

    Hello,

    Otherwise, raise a support request with Microsoft via your CSP.

    Thanks.

  • Ortwin Profile Picture
    35 on at
    RE: How to auto prefill line type on Sales Order?

    Application Areas seem to work only in the online version and not on-prem (at least not BC14). But as mentioned above you can toggle them from the Object Designer > Table 9178 Application Area Setup > Run

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 2,085

#2
YUN ZHU Profile Picture

YUN ZHU 1,810 Super User 2025 Season 2

#3
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 1,788

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans