Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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!

  • DP-21052040-0 Profile Picture
    DP-21052040-0 2 on at
    GeoLocation doesn't work on Business Central Cloud
    Hi, on May 14th I open a ticket to MS to ask information about the error.
    Today they answer me: "The product team affirmed that the inability to open Geolocation page is based on a code defect and a work item has been created to address the issue."
  • Judy Profile Picture
    Judy Microsoft Employee on at
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 64,449 Super User on at
    GeoLocation doesn't work on Business Central Cloud
    There is indeed a problem, I'm sorry I don't know the solution yet, and Microsoft's documentation doesn't say it's been deprecated, which may be a standards issue.
    codeunit 7569 "Geolocation Impl."
     
    Thanks.
    ZHU

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,513 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,862 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans