Blog

Name is Anant Dubey and the intent to create this blog is to discuss the problems and issues that developer face in the dynamics AX development and to share the new things that come up with the new version of AX.

Wednesday, October 11, 2023

Get system notification in D365FO

 


  SystemNotificationDataContract notification = new SystemNotificationDataContract();

        notification.Users().value(1, curUserId());

        notification.Title("Delete Operation ended");

        notification.RuleId('StagingCleanup');

        notification.Message(strfmt("Deleted %1 records from TestTable and Total time consumed: %2",countRecord, timeConsumed(fromTime, timeNow())));

        notification.ExpirationDateTime(DateTimeUtil::addHours(DateTimeUtil::utcNow(), 48));


        SystemNotificationsManager::AddSystemNotification(notification);