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

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

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

1 month ago

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

1 month ago

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

1 month ago

D365 Sending Email with Customer Account Statement SSRS report as attachment using X++

D365 Sending Email with Customer Account Statement SSRS report as attachment using X++ custTable _custTable;        &...

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