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

Notifications

Announcements

Community site session details

Community site session details

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

New to business central, how to modify Currency Code in Requisition Line

(1) ShareShare
ReportReport
Posted on by 6

 
I added a Currency Code field to the Item Vendor table so that when this field is changed (e.g., to USD), it also updates in the Requisition Line table. This allows a vendor to use a different currency code for an item without changing their default currency code. My question is how to implement this, as I'm very new to this environment and missing the underlying logic.
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    96,039 Super User 2025 Season 2 on at
    Hi, Just add the update logic in the OnValidate (Field) Trigger of this new field.
    OnValidate (Field) Trigger
     
    Hope this helps.
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    25,396 Most Valuable Professional on at
  • Verified answer
    DAnny3211 Profile Picture
    11,399 on at
    hi,
     
    see this
     
    tableextension 50100 "Item Vendor Extension" extends "Item Vendor"
    {
        fields
        {
            field(50100; "Currency Code"; Code[10])
            {
                trigger OnValidate()
                begin
                    UpdateRequisitionLineCurrencyCode("No.", "Currency Code");
                end;
            }
        }
        local procedure UpdateRequisitionLineCurrencyCode(ItemNo: Code[20]; CurrencyCode: Code[10])
        var
            RequisitionLine: Record "Requisition Line";
        begin
            //INSERT YOUR FILTER
            if RequisitionLine.FindSet() then
                repeat
                        RequisitionLine."Currency Code" := CurrencyCode;
                        RequisitionLine.Modify();
                until RequisitionLine.Next() = 0;
        end;
    }
     
    regards
     

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

Season of Giving Solutions is Here!

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 1,585

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 780 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 712 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans