Skip to content

MobileCRM.UI.RoutePlan.onRouteReloaded

rescocrm edited this page May 15, 2023 · 2 revisions

Binds or unbinds the handler called after route is reloaded.

Bound handler is called with the RoutePlan object as an argument on start or when day or filter field is changed.

Arguments

Argument Type Description
handler function(RoutePlan) The handler function that has to be bound or unbound.
bind Boolean Determines whether to bind or unbind the handler.
scope Object The scope for handler calls.

This example demonstrates how to react on route changes.

MobileCRM.UI.RoutePlan.onRouteReloaded(function (routePlan) {
	var day = routePlan.routeDay;
	var routeEntities = routePlan.myRoute;
	calculateStatistics(routeDay, routeEntities);
}, true);
Clone this wiki locally