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

Community site session details

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

How to use Interfaces on BC16.0 ??

(0) ShareShare
ReportReport
Posted on by

Hello All,

on BC16.0 the 7012 table (purchase price) is pending removal.

so when i declare the variable it VS is drawing a red line underneath it.

i want to do a setfilter on the table, and it works but probably on the next version i will need to change the code.

does anyone know a way using the new interfaces to get the table data into the new table(price list line)?

TIA.

I have the same question (0)
  • Suggested answer
    Binesh Profile Picture
    7,885 on at
    RE: How to use Interfaces on BC16.0 ??

    Hello, 

    You can use the "Price Calculation" interface below is the interface declaration.

    Also go through the below link for your reference.


    interface "Price Calculation"
    {
        /// 
        /// Save the source line as an interface variable inside the price calculation codeunit
        /// 
        /// The interface parameter for the document or journal line.
        /// The updated source line.
        procedure Init(LineWithPrice: Interface "Line With Price"; PriceCalculationSetup: Record "Price Calculation Setup")
    
        /// 
        /// After the calculation is done by calling ApplyPrice() or ApplyDiscount() 
        /// the updated line is retrieved by this method. 
        /// 
        /// The updated source line.
        procedure GetLine(var Line: Variant)
    
        /// 
        /// Executes the calcluation of the discount amount. 
        /// 
        procedure ApplyDiscount()
    
        /// 
        /// Executes the calculation of the price or cost.
        /// 
        /// The id of the field that caused the calculation.
        procedure ApplyPrice(CalledByFieldNo: Integer)
    
        /// 
        /// Returns the number of price list lines with discounts that fit the source line.
        /// 
        /// If true it widens the filters set to the price list line.
        /// Number of price list lines with discounts that fit the source line.
        procedure CountDiscount(ShowAll: Boolean) Result: Integer;
    
        /// 
        /// Returnes the number of price list lines with prices that fit the source line.
        /// 
        /// If true it widens the filters set to the price list line.
        /// Number of price list lines with prices that fit the source line.
        procedure CountPrice(ShowAll: Boolean) Result: Integer;
    
        /// 
        /// Returns the list of price list lines with discount that fit the source line.
        /// 
        /// the temporary buffer containing the price list line that fit the source line.
        /// If true it widens the filters set to the price list line.
        /// true if any price list line is found
        procedure FindDiscount(var TempPriceListLine: Record "Price List Line"; ShowAll: Boolean) Found: Boolean;
    
        /// 
        /// Returns the list of price list lines with prices ot costs that fit the source line.
        /// 
        /// the temporary buffer containing the price list line that fit the source line.
        /// If true it widens the filters set to the price list line.
        /// true if any price list line is found
        procedure FindPrice(var TempPriceListLine: Record "Price List Line"; ShowAll: Boolean) Found: Boolean;
    
        /// 
        /// Returns true if exists any price list line with discount that fit the source line. 
        /// 
        /// If true it widens the filters set to the price list line.
        /// true if any price list line is found
        procedure IsDiscountExists(ShowAll: Boolean) Result: Boolean;
    
        /// 
        /// Returns true if exists any price list line with price or cost that fit the source line. 
        /// 
        /// If true it widens the filters set to the price list line.
        /// true if any price list line is found
        procedure IsPriceExists(ShowAll: Boolean) Result: Boolean;
    
        /// 
        /// Allows to pick from the list of price list lines with disocunt that fit the source line.
        /// 
        procedure PickDiscount()
    
        /// 
        /// Allows to pick from the list of price list lines with price or cost that fit the source line.
        /// 
        procedure PickPrice()
    
        /// 
        /// Opens the list page for reviewing existing prices. 
        /// 
        /// The buffer with the found price list lines.
        procedure ShowPrices(var TempPriceListLine: Record "Price List Line")
    }

  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,207 Super User 2025 Season 2 on at
    RE: How to use Interfaces on BC16.0 ??

    The price calculation is not workable until BC17. Just ignore the warning until Microsoft give us more detail on how to use the price calculation (probably on BC17).

    The existing sales and purchase price will be removed on BC18, so we still have plenty of time.

    More information here.

    thatnavguy.wordpress.com/.../

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,275

#2
Sumit Singh Profile Picture

Sumit Singh 2,677

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,526

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans