Wednesday, 9 December 2020

IoTIntCoreNotificationProcessor in d365

/// <summary>
/// The <c>EntAssetIotIntCoreNotificationProcessor_Extension</c> class implements extension logic for Iot Int notification processing.
/// </summary>
[ExtensionOf(classStr(IoTIntCoreNotificationProcessor))]
internal final class EntAssetIotIntCoreNotificationProcessor_Extension
{
    internal void processNotification(IoTIntCoreNotification _notification)
    {
        next processNotification(_notification);
       
        //Check if EntAssetIoTFlight is enabled, before processing Incomming IoT Notifications
        if(EntAssetIotFlight::instance().isFeatureAndConfigurationkeyEnabled())
        {
            this.processIoTIntCoreNotification(_notification);
        }
    }
    /// <summary>
    /// Performs tasks that are required upon processing of a notification.
    /// </summary>
    /// <param name="_notification">An instance of the <c>IoTIntCoreNotification</c> table.</param>
    internal void processIoTIntCoreNotification(IoTIntCoreNotification _notification)
    {
        if (!_notification || _notification.NotificationStatus != IoTIntCoreNotificationStatus::Active)
        {
            // log empty object as we always expect a non-empty record.
            return;
        }
        // Log the call
        EntAssetIotIncomingNotificationProcessor::createFromIoTIntCoreNotification(_notification);
    }
}

No comments:

Post a Comment

DefaultDimension in d365 FO X++

 Navigate to PurchTable methods you can find with DefaultDimension this.DefaultDimension = this.mergeDimension(this.getDefaultDimension(),th...