Skip to main content

Notifications

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

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,036 Super User 2024 Season 2 on at
    RE: How to set a Default value for a field in the Sales order line?

    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

  • TK8782 Profile Picture
    TK8782 on at
    RE: How to set a Default value for a field in the Sales order line?

    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
    Mohana Yadav Profile Picture
    Mohana Yadav 59,194 Super User 2024 Season 2 on at
    RE: How to set a Default value for a field in the Sales order line?

    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.

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans