ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 4 - Currency - OnBeforeResolveCurrencySymbol

Open UIBKH opened this issue 3 years ago • 1 comments

Dear Support,

We would like to add a new event OnBeforeResolveCurrencySymbol in the following Procedure below. This would allow us to further customize the code and migrate existing customizations.

procedure ResolveCurrencySymbol(CurrencyCode: Code[10]): Text[10]
var
    Currency: Record Currency;
    PoundChar: Char;
    EuroChar: Char;
    YenChar: Char;
begin
    OnBeforeResolveCurrencySymbol(Rec, CurrencyCode); //New  Code --++
    if Currency.Get(CurrencyCode) then
        if Currency.Symbol <> '' then
            exit(Currency.Symbol);

    PoundChar := 163;
    YenChar := 165;
    EuroChar := 8364;

    case CurrencyCode of
        'AUD', 'BND', 'CAD', 'FJD', 'HKD', 'MXN', 'NZD', 'SBD', 'SGD', 'USD':
            exit('$');
        'GBP':
            exit(Format(PoundChar));
        'DKK', 'ISK', 'NOK', 'SEK':
            exit('kr');
        'EUR':
            exit(Format(EuroChar));
        'CNY', 'JPY':
            exit(Format(YenChar));
    end;

    exit('');
end;

Event signature:

[IntegrationEvent(false, false)]
local procedure OnBeforeResolveCurrencySymbol(var Currency: Record Currency; var CurrencyCode : Code[10])
begin
end;

UIBKH avatar Feb 03 '23 09:02 UIBKH

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 53084.

JesperSchulz avatar Feb 10 '23 09:02 JesperSchulz