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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

Business Central - Posting "Invoice Disc. Pct." field from Sales Order to Posted Sales Shipment

(0) ShareShare
ReportReport
Posted on by 60

Hello Experts,

I have created a new FlowField in "Sales Shipment Header" table extension and thought of doing a lookup and fetch value of "Invoice Disc. Pct." from Sales Order. But I am unable to locate the parent table where "Invoice Disc. Pct." field is stored. I have looked into "Sales Header" and "Sales Line" tables, but couldn't locate the field.

I am using VS Code to do development. I am using the tedious option of relying on the Auto-complete feature of VS Code when you type some alphabets to find a table or the fields in the table.

I am totally new to BC AL development and have no previous experience with previous versions of NAV. Is there a better way to find the tables used for each module (along with their fields if possible). Please help.

Many thanks,

Amar

Categories:
  • Amar Deep Profile Picture
    60 on at

    Wanted to add few more details, hope it helps someone who is willing to help.

    I am using Online Sandbox for development. (Trying to find the correct parent table which holds the Invoice Disc. Pct. field)

    00680.Capture.PNG

    Below is a screenshot of the field location in Business Central (Sales Order)

    00680.Capture.PNG

    Please let me know if you need any additional information. Thanks for you help.

  • Verified answer
    AJAnsari Profile Picture
    5,754 on at

    It originates from Table 19 (Cust. Invoice Disc.), and can be viewed from Page 23 (Cust. Invoice Discounts). That said, your idea to grab this value as a flowfield may not be as simple as you have imagined. The Customer Invoice Discount table stores the invoice discount percentage along with a minimum amount that must be exceeded before the discount is applied.

    The invoice discount is then applied on the Sales Order based on the values in fields like Invoice Disc. Code, Invoice Discount Amount, Invoice Discount Calculation, and the Invoice Discount Value. Further, the Posed Sales Shipment documents (especially the Sales Shipment Header tables) does not store much - if any - financial information that is stored in Sales Orders.

    Also, keep in mind, that a Posted Sales Shipment may only be for a partial shipment from an order, so the overall Invoice Discount may need to be broken down to only show the amount relevant to the items in the partial shipment.

    If you absolutely must grab a value for your flow field, try to grab the Invoice Discount Value from the Sales Header table. But it may not always be an accurate of the invoice discount applicable to the item qtys. on the shipment.

    I hope this helps. If my response has answered your question, please verify by clicking Yes next to "Did this answer your question?"

  • Amar Deep Profile Picture
    60 on at

    Thank you Ansari for guiding in the right direction.

    I have used Invoice Discount Value from the Sales Header table in combination of other fields to decide the actual discount percentage. And then applied to individual Sales Shipment line items.

    In your answer, you had referred to Table 19 (Cust. Invoice Disc.), and Page 23 (Cust. Invoice Discounts). I have seen experience people referring to tables, pages and code units with numbers. Where can I find those details (any documentation or container Sandbox)

    Thanks again,

    Amar

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans