Loading...

clicking link on info message X++ to Open form

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 more
Sherif Fayed
Sherif Fayed

Share post:

Related posts

New Approved Customer List mapping for Items in Dynamics 365 Finance and operations

Take control of your sales process with the latest feature in Microsoft Dynamics 365 Finance – the Approved Customer List! This powerful new f...

2 days ago

Part-9: Connect and Query Dynamics 365 Finance and operations data with Copilot studio

In this video, we kick off an exciting new series focused on extending Copilot Studio capabilities by connecting it to real enterprise data! �...

2 days ago

How to Create Deep Links to D365 F&O Records with Dataverse Virtual Tables

It is a common requirement for SaaS platform that exposes form over data to be able to share a secure link (a.k.a. Deep Link) to access a give...

2 months ago

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. ...

3 months ago

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...

4 months ago

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...

8 months ago

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...

9 months ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy