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!