Business Central Musings

For the things we have to learn before we can do them, we learn by doing them

Business Central 2021 wave 2: documents have now a default line type. See how to set it up!

Share This Post

In Business Central, sales and purchase documents have lines and lines can be of different types:

  • comment line: ” “
  • “G/L Account”
  • “Item”
  • “Resource”
  • “Fixed Asset”
  • “Charge (Item)”

When editing a sales line document, a user would have to pick one of these values.

With BC 2021 wave 2, customers can default the value of line type to a value that is used most often.

E.g. If an end-user has sales documents in which the Resource line types is very frequent, they could set the “Default Line Type” to “Resource” in “Sales & Receivables” page:

Let’s see it in action!

From the get-go, as soon as we open a new Sales Quote, we can see that the lines have “Resource” as line type:

If you manually change the Type to a different value, e.g. “G/L Account”, the subsequent lines are taking the default from the line above:

Similar to sales documents, purchase documents have a default line type.

End-users can set up their purchase line default type in “Purchase & Payables Setup” page:

It is also possible to use a different line type, for example “Tutor”.

An AL developer would need to expand the “Sales Line Type” enum to include the new value:

enumextension 50100 SalesLineTypeWithTutorExt extends "Sales Line Type"
{
    value(50100; Tutor)
    {
        Caption = 'Tutor';
    }
}

Deploying the extended enum would make possible to choose the new enum value:

And the sales documents would use the new line type as default:

Of course, there is more custom code to write to make the new enum usable in the documents, but about that in a future blog.

Share This Post

Related Articles

Leave a Reply

Recent Posts

Get Notified About New Posts

Categories
Verified by MonsterInsights