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

I have a strange problem (Read Quantity) and I want a solution from experienced people

(5) ShareShare
ReportReport
Posted on by 322
Hi
 
I have a strange problem and I want a solution from experienced people
 
I hope I can explain the problem clearly.
The problem I have is that I created an edit on the "Sales Invoice" screen so that the user fills out a sales invoice and adds a "post" to it. After making the "post," the edit sends the invoice to the tax website. The problem here is that the user doesn't fill out the line in the traditional way, but rather selects the line from "shipment." The line is filled automatically without any manual intervention. Here, when the "post" is executed and the edit code is run, the code doesn't read the Quantity value correctly. It's very strange that it reads the wrong value. For example, the first line has a Quantity of (5) and the code reads it as (0.05) ?????????? I don't know why...
I tried entering the Quantity again. I mean, entering the number (5)  on the keyboard again solves the problem, and the edit works correctly after the "post." Is there a solution in the code that I can do without re-entering the Quantity for each line? Sometimes the Quantity field coming from "shipment" is disabled and needs to be entered again.
 
Please help me solve this problem by explaining how I can refresh all the lines so that the code reads the correct Quantity for each line.
 
 
I have the same question (0)
  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,639 Super User 2025 Season 2 on at
    Hello,
     
    is there any Customization related to the same? 
  • CU09091051-0 Profile Picture
    322 on at
    is there any Customization related to the same? 
    No 
  • Gerardo Rentería García Profile Picture
    25,373 Most Valuable Professional on at
    Hi
    You indicated that you created a copy of the sales invoice page and that you selected the shipment lines. Is that correct?
    So, I understand it's a custom development, right?
    Best
    GR
  • CU09091051-0 Profile Picture
    322 on at
     
     
    There are no Customization to shipment lines.
     
    When the user fills out the invoice, he does not fill out the invoice line, but rather withdraws the line from something called shipment.
     
  • Suggested answer
    Ben Baxter Profile Picture
    6,620 Super User 2025 Season 2 on at
    Is there a reason you aren't using the "Get Shipment Lines" function to do exactly what you've described?  There is base functionality to pull shipment lines into a Sales Invoice.  You can then utilize your call to the tax engine to calculate the tax for the Invoice.
     
    Best Regards,
    Ben Baxter
    Accent Software Inc
  • Vahid Ghafarpour Profile Picture
    12,185 Super User 2025 Season 2 on at
    If any of the responses helped resolve your issue, please take a moment to mark the best answer. This helps others in the community quickly find solutions to similar problems.

    To do this, simply click the "Does this answer your question?" button on the most helpful response and like the helpful posts. If your issue is still unresolved, feel free to provide more details so the community can assist further!

    Thanks for being an active part of the Dynamics 365 Community! 😊
  • Suggested answer
    YUN ZHU Profile Picture
    95,748 Super User 2025 Season 2 on at
    It looks like a problem with quantity related fields. Hopefully the following information can give you some hints.
    Dynamics 365 Business Central: The difference between Record.Validate() Method and assignment statement
     
    Thanks.
    ZHU
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,647 Super User 2025 Season 2 on at

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 2,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans