Method 'IsInvoicing' is marked for removal. Reason: Microsoft Invoicing is not supported on Business CentralAL(AL0432) in BC Cloud Wave2

Hi All,

I am resolving errors from AL objects for Wave2 release. in one report there is piece of code :

if IdentityManagement.IsInvAppId then begin
"Language Code" := Language.GetUserLanguage;
CurrReport.LANGUAGE := Language.GetLanguageID(“Language Code”);
end;
if not IdentityManagement.IsInvAppId then begin
if GLOBALLANGUAGE = Language.GetLanguageID(“Language Code”) then
CurrReport.LANGUAGE := Language.GetLanguageID(“Language Code”)
else
CurrReport.LANGUAGE := Language.GetLanguageID(‘ENU’);
end;

here I was getting error ‘Codeunit “Identity Management”’ does not contain a definition for 'IsInvAppId’AL(AL0132) after search I did below changes in code

if EnvInfoProxy.IsInvoicing then begin //replacement for Wave2
"Language Code" := Language_CU.GetUserLanguageCode();
CurrReport.Language := Language_CU.GetLanguageId(“Language Code”);
end;
if not EnvInfoProxy.IsInvoicing then begin
if GlobalLanguage = Language_CU.GetLanguageId(“Language Code”) then
CurrReport.Language := Language_CU.GetLanguageId(“Language Code”)
else
CurrReport.Language := Language_CU.GetLanguageId(‘ENU’);

end;

where EnvInfoProxy is codeunit 9995 “Env. Info Proxy” and Language_CU is codeunit - Language. But now I am getting warning -

Method ‘IsInvoicing’ is marked for removal. Reason: Microsoft Invoicing is not supported on Business CentralAL(AL0432)

I can not found any solution for it. Do anyone has idea?

Thanks in advance.

Is this report a standard report? If yes, then you should report this to Microsoft.

But may I ask why you would need the “IsInvoicing” method? This method is AFAIK only used in connection with the Office 365 Invoicing application (which is actually BC). So unless you’re trying to extend the Invoicing application, then you wouldn’t need this method.

Thanks Erik for the reply.

I checked, they are not using O365 Invoicing, so its good to comment the code -

if IdentityManagement.IsInvAppId then begin
“Language Code” := Language.GetUserLanguage;
CurrReport.LANGUAGE := Language.GetLanguageID(“Language Code”);
end;
if not IdentityManagement.IsInvAppId then begin
if GLOBALLANGUAGE = Language.GetLanguageID(“Language Code”) then
CurrReport.LANGUAGE := Language.GetLanguageID(“Language Code”)
else
CurrReport.LANGUAGE := Language.GetLanguageID(‘ENU’);
end;

It’s never good to comment code - or what do you mean? You didn’t answer my question.

Sorry Erik for delay in reply. It is a standard report.

If it’s a standard report, then why is this a problem to you? This would be something Microsoft should look into (and I guess they are). Plus it’s ONLY a warning.