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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

Azure maps error

(0) ShareShare
ReportReport
Posted on by 75

Hi,

I'm currently working on creating an extensible control that displays the Azure maps and allowing user to interact with it. I want to update my datasource record with the new coordinates whenever the map is clicked. In javascript, I created an observable that will be fired when a click event occurs. The observe function will the run the callFunction framework to update my record in x++. Seem very easy but I got the following error in the console. Apparently callFunction cannot be used in an interaction which in this case i think is the click event in azure maps

pastedimage1583101880248v1.png

Here is my code in javascript. Is there a way around this?

var coordChanged;

coordChanged = $dyn.observable(false);

//map is the azure map instance and below is the click event

map.events.add('click', function (e) {
coordChanged(true);
});

$dyn.observe(coordChanged, function (value) {
if (value == true) {
$dyn.callFunction(control.UpdateLatLon, control, { _latitude: newLat, _longitude: newLon }, {});
}
coordChanged(false);
});

 

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Shazrul,

    Can you indicate if this question is related to Dynamics 365 SCM?

  • Verified answer
    Askor Profile Picture
    75 on at

    Hi Andre,

    Yes this is SCM. I found the solution. I use $dyn.Function instead and it works!

    By the way, I think we met during the last Business Summit in Seattle :D

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 266 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 140 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans