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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

problems changing the language of a custom report for a invoice,

(0) ShareShare
ReportReport
Posted on by 8
 
 
 
 
 
i get this error: A language that is not supported has been selected (DE - The requested culture is not supported by the current platform)
Code: 
 
            trigger OnAfterAfterGetRecord()
            var
                Languagemgt: Codeunit Language;
                FormatAddr: Codeunit /Format Address/;
                Cust: Record /Customer/;
                Countrycode: Code[10];
                CustomerNo: code[20];
               langcodeint: integer;
              //1031 de-DE
            begin
                Cust.Get(/Bill-to Customer No./);    
                Countrycode := Cust./Country/Region Code/;
                CurrReport.FormatRegion := Languagemgt.GetFormatRegionOrDefault(Countrycode);
                FormatAddr.SetLanguageCode(Countrycode);
                   case Countrycode  of
                 'DE':
                 langcodeint := 1031
                end;
                CurrReport.Language :=  langcodeint;
                CurrReport.Language :=Languagemgt.GetLanguageIdOrDefault(Countrycode);
            end;
 
 
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,390 Super User 2025 Season 2 on at
    Hi,
     
    Try this code :
    trigger OnAfterAfterGetRecord()
    var
        Languagemgt: Codeunit Language;
        Cust: Record "Customer";
    begin
        Cust.Get("Bill-to Customer No.");
        CurrReport.Language := Languagemgt.GetLanguageIdOrDefault(Cust."Country/Region Code");
    end;
    Best regards,
    Mohamed Amine MAHMOUDI
  • DS-10050821-0 Profile Picture
    8 on at
    Thanks for answearing Mohamed Amine, i tried your solution, and it's still not working :)
     

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 93

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans