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

Notifications

Announcements

No record found.

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
    60,993 Super User 2025 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
    95,329 Super User 2025 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans