If you are running Microsoft Business Notifications with Microsoft Dynamics NAV, you can associate XMLport events with an XMLport. Users who run Business Notifications can then subscribe to these events. For example, you could define the event Sales Order Created for a Sales Order XMLport. You will usually design special XMLports for the Business Notifications system.

Events

XMLport events are called from codeunits to raise an event to Business Notifications. The XMLport then sends an XML document to the Business Notifications system. Based on the content of the XML document and the event raised, the Business Notifications system will send event information to subscribers. For example, in the case of the Sales Order Created event, it will check to see who has subscribed to this event and send them e-mail notification that a sales order has been created.

The events that you define can be more detailed than simply Sales Order Created. For example, you can define an event that is raised when the total amount of a sales order exceeds a certain amount.

Example

You want to raise an event that provides notification when a customer is blocked, that is, when Blocked changes from false to true. You therefore design an XMLport that contains the necessary data, for example, the ID and Name of the customer, and the date when the change occurred. You define an event called Blocked in XMLport Event Designer and you declare the XMLport as a local variable called CustXMLDoc. Finally, you add the following code to the OnModify trigger in the Customer table:

  CopyCode imageCopy Code
IF Blocked = TRUE THEN
  IF Blocked <> xRec.Blocked THEN
	CustXMLDoc.Blocked();

See Also