Skip to main content

Notifications

Announcements

No record found.

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

how to enable camera in business Central cloud

Posted on by 83
Hi
I am using Dynamics 365 Business Central cloud. 
I want to know 'how to enable camera in business Central cloud'
Can you give help in AL
 
Warm regards
Categories:
  • how to enable camera in business Central cloud
    i will drop a short line of code that should work fine on the requirement microsoft has two different function one for cloud and onprep
     
     
    procedure TakeRealPicture(): Boolean
        var
            istream: InStream;
            PictureName: Text;
            Camera: Codeunit Camera;
            MimeTypeTok: Label 'image/jpeg', Locked = true;
        begin
            Rec.Find();
            Rec.TestField("No.");
            Rec.TestField(Description);
            // if rec."Item Image".Count > 0 then begin
            if not Confirm('The existing picture will be replaced. Do you want to continue?') then
                exit(false);
            if Camera.IsAvailable() then begin
                if Camera.GetPicture(istream, PictureName) then begin
                    Clear(Rec."Item Image");
                    rec."Item Image".ImportStream(istream, PictureName, MimeTypeTok);
                    rec.Modify(true);
                    exit(true);
                end
            end
        end;
     
     
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    how to enable camera in business Central cloud
    Hi, sorry I'm not sure if this still works in the current version, hope this gives you some hints.
     
     
    Thanks
    ZHU

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