clicking link on info message X++ to Open form
Message::AddAction() method can be used to embed an action within a message sent to the message bar. This method supports adding a single action that is associated with a display or action menu item, which is then visualized as a link button, redirecting users directly to the form with the correct record selected. Here's how it can be used.
public static void pushNotification(str NotificationMsg, str actionText,LedgerJournalTable journalTable) { MenuItemMessageAction actionData = new MenuItemMessageAction(); actionData.MenuItemName(menuItemDisplayStr(LedgerJournalTable)); actionData.TableName(tableStr(LedgerJournalTable)); actionData.RecId(journalTable.RecId); str jsonData = FormJsonSerializer::serializeClass(actionData); int64 messageId = Message::AddAction(MessageSeverity::Informational,NotificationMsg ,actionText, MessageActionType::DisplayMenuItem, jsonData); }Muhammad Aamir Hanif Reference
Published on:
Learn moreRelated posts
Simplifying License Management for Dynamics 365 Finance and Operations: Improved User License Validation
Starting April 30th, Dynamics 365 administrators will gain access to new license usage reporting tools, centralizing user license management. ...
D365FO Integration: Import Sales Orders from an External Web Application
Learn how to implement robust and efficient process to import complex documents into Dynamics 365 Finance and Operations from external Web ser...
Practical Hints for Technical Management of D365FO Go-Live
In this post, I share practical insights from my experience managing the technical side of Go-Live for D365FO projects, focusing on key activi...
D365FO Integration: Event-Based Exports to External Web Services
How to implement robust, efficient integrations between Dynamics 365 Finance and Operations and external Web Services. This post covers design...
Physical cost inclusion for Weighted Average Valuation in Microsoft Dynamics 365 Finance and Operations: Part-13
What is physical cost in Dynamics 365 F&O? Anything which has been received or shipped but not invoiced is considered as physical cost for...
Product bundles in Microsoft Dynamics 365 Finance and Operations
Product bundle was first introduced in module revenue recognition but as we all know the there is new modules which has been introduced and wi...