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...
Suggested Answer

CurrencyFactor by Document Date

(0) ShareShare
ReportReport
Posted on by 50

Hi, how to setup Currency Factor by Document Date. I have issue because Currency Factor only count the newest Exchange Rate. For example if i select Document Date at 01.07.2022, Currency Factor refuse to update, and stay at current day. I trying to set up this on Quotes. 

Any solutions?

I have the same question (0)
  • Suggested answer
    Tony00001 Profile Picture
    50 on at

    I used EventSubscription:

    [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterValidateEvent', 'Document Date', false, false)]

       local procedure CallOnUpdateExchangeRate(CurrFieldNo: Integer; var Rec: Record "Purchase Header"; var xRec: Record "Purchase Header")

       begin

           if Rec."Currency Code" <> '' then

               Rec.UpdateCurrencyFactor();

           if Rec."Currency Factor" <> xRec."Currency Factor" then begin

               Rec.ConfirmCurrencyFactorUpdate();

           end;

       end;

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

       local procedure UpdateExchangeRate(CurrentFieldNo: Integer; var CurrencyDate: Date; var PurchaseHeader: Record "Purchase Header")

       begin

           CurrencyDate := PurchaseHeader."Document Date";

           CurrentFieldNo := PurchaseHeader.FieldNo("Document Date");

       end;

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,055 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,014 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans