Quantcast
Channel: Microsoft Dynamics AX
Viewing all articles
Browse latest Browse all 101540

Blog Post: Alert for a team

$
0
0
Hi in AX2012 exists the team definition, you’ll find under  organisation administration ->setup->organisation->Teams Here it’s possible define a group of user that share same knowledge or goal in a company, same task of works and so on … This team may don’t have same Role rights In my experience could be useful have a utility like the below (I’ve post only the static methods of a class) public static void sendAlert2Team(Name _name, notesLine _Message, notesLine _Subject) { OMTeam OMTeam; DirPartyRelationship relationShip; EventInbox inbox; ; select firstonly OMTeam where OMTeam.Name == _name; if(!OMTeam.RecId) return; while select relationShip where relationShip.ParentParty == OMTeam.RecId { if(DirPersonUser::findParty(relationShip.ChildParty).User == "") return; inbox.initValue(); inbox.ShowPopup = NoYes::Yes; inbox.Subject = _subject + " by " + SysUserInfo::currentUserDisplayName(); inbox.Message = _Message + " by " + SysUserInfo::currentUserDisplayName(); inbox.AlertedFor = "This alert is just information no links are available"; inbox.SendEmail = false; inbox.UserId = DirPersonUser::findParty(relationShip.ChildParty).User; inbox.TypeId = classnum(EventTypeCUD); inbox.AlertTableId = tablenum(inventitemprice); inbox.AlertFieldId = fieldnum(inventitemprice, itemid); inbox.TypeTrigger = EventTypeTrigger::DueType; inbox.CompanyId = curext(); inbox.InboxId = EventInbox::nextEventId(); inbox.AlertCreatedDateTime = DateTimeUtil::getSystemDateTime(); inbox.DueDateTime = today() + 90; inbox.NotificationType = EventNotificationType::Action; inbox.NotificationSource = EventNotificationSource::Workflow; inbox.insert(); } } This utility could be useful for example for advice a team where an item have modified (managing a event handler related to the update methods of inventtable). Clearly it’s better to manage the workflow system or using the standard alert system, in some other case I see that this type of utility was appreciate and answer to claim of many users that in a team many time not have the updates from colleagues about change in the master data or other in AX.

Viewing all articles
Browse latest Browse all 101540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>