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

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

1 month ago

Implement Periodic Data Export from D365FO to SFTP

This blog post describes how to implement various scenarios for periodic data export from D365FO to a file and uploading it to SFTP server.

1 month ago

[New Feature] Financial Consolidation Template in Microsoft Dynamics 365 Finance and Operations

πŸš€ New Feature Online Consolidation Template! πŸš€ This feature streamlines the financial consolidation process and enhances the user experience...

2 months ago

[New Feature] Bank Account Lifecycle Management in Microsoft Dynamics 365 Finance and Operations

πŸš€ New Feature: Workflow approvals for Bank master! πŸš€ Microsoft has recently added a new preview feature in Microsoft Dynamics 365 Finance an...

2 months ago

Business Performance Analytics in Microsoft Dynamics 365 Finance and Operations: Part-2

πŸ“’ Now Time to Business Performance Analytics in Microsoft Dynamics 365! Let’s dive into the various reports available in Business Perfo...

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