MobileCRM.UI.RoutePlan.onItemAdded - Resconet/JSBridge GitHub Wiki
Binds or unbinds the handler for "Item Added" event.
Bound handler is called with the RoutePlan object as an argument.
The RoutePlan context object contains property "entity" carrying DynamicEntity object of the new visit record.
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 modify new appointment when being included into the route.
MobileCRM.UI.RoutePlan.onItemAdded(function (routePlan) {
var newAppointment = routePlan.context.entity;
newAppointment.properties.description = "Added from RoutePlan";
}, true);