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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to set a Default value for a field in the Sales order line?

(0) ShareShare
ReportReport
Posted on by 45

Hi,

I want to default Unit Cost (LCY) field to "0", what should I do?

Thank you!!

pastedimage1643274916301v1.png

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,248 Super User 2026 Season 2 on at

    you can setup sales prices for all customers against each item with 0

    or you have to customize and write code to make it 0 after standard code assigns the value.

  • TK8782 Profile Picture
    18 on at

    I don't understand why you should set the unit cost to 0. What is the purpose behind it? What about the calculation of the contribution margin?

    In my opinion you can change or develop anything but you should always question what the purpose of it is.

  • Suggested answer
    YUN ZHU Profile Picture
    102,944 Super User 2026 Season 2 on at

    Hi, You can add a procedure in the OnAfterValidate trigger of No. field to set Unit Cost (LCY)to 0.

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/triggers-auto/fieldextension/devenv-onaftervalidate-fieldextension-trigger

    But I total agree with Thommy, it's not hard to do, but what's the point of doing it? Please note that this system also allows 0 unit price postings. If you forget to enter the unit price, it will affect the sales.

    pastedimage1643331513997v1.png

    Hope this will help.

    Thanks.

    ZHU

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 595 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 364 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 331 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans