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 :
Small and medium business | Business Central, N...
Answered

After changing buy-from vendor in a purchase quote, set the tax liable = true (default is false)

(0) ShareShare
ReportReport
Posted on by 132

Hi all,

We use purchase quotes for taxable purchases. In this case, most of the vendors in our system are non-taxable for purchase orders.

I would like to:

  • set a trigger after changing the buy-from vendor name 
  • this trigger should over-ride default vendor settings, and set purchaseheader.taxliable = true if it is a purchase quote

Appreciate your guidance and suggestions,

**RESOLVED** Incase if it is of help to anyone

codeunit 60002 c60002PurchaseHeaderTaxLiable
{
    [EventSubscriber(ObjectType::Page, Page::"Purchase Quote", 'OnAfterValidateEvent', 'Buy-from Vendor Name', false, false)]
    local procedure MyProcedure(var Rec: Record "Purchase Header")
    begin
        Rec."Tax Liable" := true;
        Rec."Tax Area Code" := 'CA';
        rec.Modify();
    end;
}

Thank you

  • Verified answer
    Mohana Yadav Profile Picture
    61,260 Super User 2026 Season 2 on at

    You can try the below code.

    [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterCopyBuyFromVendorFieldsFromVendor', '', false, false)]

       local procedure OnAfterCopyBuyFromVendorFieldsFromVendor(var PurchaseHeader: Record "Purchase Header"; Vendor: Record Vendor; xPurchaseHeader: Record "Purchase Header");

       begin

           if PurchaseHeader."Document Type" = PurchaseHeader."Document Type"::Quote then

               PurchaseHeader."Tax Liable" := true;

       end;

  • SammySevens Profile Picture
    132 on at

    Another winner from Mohana, thank you again!!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 671 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 434 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 241 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans