Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

The application object or method has scope 'OnPrem' and cannot be used for 'Extension' development, AL0296 error

Posted on by 41

I am running an extension OnPrem and everything went well, BUT When I want to run it onCloud:

So could you please tell me if you know the correspondent of these Objects/methods onCloud?

Record Object:
RecordObject.png
TemporaryPath, Close and DownloadToFile of Codeunit "File Management":
4477.File.png
Read, LEN, Open, WriteMode, TextMode on xmlFile: File and method Exists:
xmlFile.png
SaveFileDialog on Codeunit 419: 
SaveFileDialog.png
OpenBook and SelectSheetsName on Record "Excel Buffer" temporary:
SelectSheetsName.png
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: The application object or method has scope 'OnPrem' and cannot be used for 'Extension' development, AL0296 error

    For filehandling in the cloud you have to go through a steam and use download from stream or upload to stream

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/file/file-downloadfromstream-method

    And in the Excel buffer you must use the openbookstream methode. and the updatebook stream methode.

    www.kauffmann.nl/.../

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans