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

Community site session details

Session Id :
Business Central forum
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Geolocation doesn't work on Business Central Cloud

Posted on by 6

Hi everyone,
I'm getting an error when i try to get Latitude & Longitude. The code looks like this shown below :

            action(GeoLocation)

            {

                Caption = 'GeoLocation';

                ApplicationArea = All;

                Promoted = true;

                Image = Map;

                trigger OnAction()

                var

                    Geolocation: Codeunit Geolocation;

                    Latitude: Decimal;

                    Longitude: Decimal;

                    Msg: Label 'Latitude is %1.//Longitude is %2.';

                begin

                        Geolocation.SetHighAccuracy(true);

                        if Geolocation.RequestGeolocation() then begin

                            Geolocation.GetGeolocation(Latitude, Longitude);

                            Message(Msg, Format(Latitude), Format(Longitude));

                        end;

                end;





And the error I get says : /
Exception of type 'Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLNotSupportedTypeException' was thrown./

 

Can anyone help with this. Thanks in advanced!

Categories:

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans