Starting in version 10.0.10 Platform update 34, you can use the Message::AddAction() method to embed an action within a message. This will help user to navigate through error on the form to update the data.
Example:
class TestJob_MenuAction
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
MenuItemMessageAction actionData = new MenuItemMessageAction();
actionData.MenuItemName(menuItemDisplayStr(Inventsite));
str jsonData = FormJsonSerializer::serializeClass(actionData);
Message::AddAction(MessageSeverity::Error, "Site information required.", 'Site Master.',
MessageActionType::DisplayMenuItem, jsonData);
}
}
Output:

On click of Site Master, InventSite form will be opened.
No comments:
Post a Comment