Hi All.
I need help now - I can’t show the Action on ribbon tab “Home” of new created page type ListPart in the NAV 20018 (Cumulative Update 10) from VSC (v 1.40.1);
The source code like below:
page xxxxxx48 "Posted Purch. Invoice Payment"
{
Caption = 'Posted Purchase Invoice Payment';
PageType = ListPlus;
ApplicationArea = All;
UsageCategory = Tasks;// Administration;
SourceTable = "Purch. Inv. Header";
SourceTableTemporary = true;
//SourceTableView = sorting ("Posting Date") order(descending) where ("Posting Date" = filter (<> 0D));
RefreshOnActivate = true;
InsertAllowed = false;
ModifyAllowed = false;
DeleteAllowed = false;
PromotedActionCategories = 'New,Process,Report,Invoice';
layout
{
area(Content)
{
..
}
}
actions
{
area(Processing)
{
action(SendPayment)
{
Caption = 'Bank Pay';
ToolTip = 'Initiate payment request for the current batch of documents.';
Image = ExportToBank;
ApplicationArea = All;
//ApplicationArea = Basic, Suite;
PromotedCategory = Category4;
PromotedIsBig = true;
Promoted = true;
Enabled = RunRequest;
//PromotedOnly = true;
trigger OnAction()
var
GenJournalLine: Record "Gen. Journal Line";
GenJournalBatch: Record "Gen. Journal Batch";
ErrorBatchEmpty: Label 'The %1 cannot be empty';
begin
if CurrentJnlBatchName = '' then
Error(ErrorBatchEmpty, GenJournalLine.FieldCaption("Journal Batch Name"));
end;
}
}
area(Navigation)
{
action(VendorAction)
{
Caption = 'Vendor';
ToolTip = 'View or edit detailed information about the vendor on the purchase document.';
//ApplicationArea = Basic, Suite;
ApplicationArea = All;
//Promoted = true;
//PromotedCategory = Category4;
Image = Vendor;
RunObject = page "Vendor Card";
RunPageLink = "No." = field ("Buy-from Vendor No.");
}
Action(Statistics)
{
Caption = 'Statistics';
ToolTip = 'View statistical information, such as the value of posted entries, for the record.';
ApplicationArea = All;
//ApplicationArea = Advanced;
Image = Statistics;
//Promoted = true;
//PromotedCategory = Category4;
ShortcutKey = 'F7';
trigger OnAction()
begin
if "Tax Area Code" = '' then
Page.RunModal(Page::"Purchase Invoice Statistics", Rec, "No.")
else
Page.RunModal(Page::"Purchase Invoice Statistics", Rec, "No.");
end;
}
Action(Comments)
{
Caption = 'Co&mments';
ToolTip = 'View or add comments for the record.';
ApplicationArea = All;
//ApplicationArea = Advanced;
Image = ViewComments;
RunObject = Page "Purch. Comment Sheet";
RunPageLink = "Document Type" = const ("Posted Invoice"), "No." = field ("No.");
}
Action(Dimensions)
{
Caption = 'Dimensions';
AccessByPermission = TableData Dimension = R;
ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to sales and purchase documents to distribute costs and analyze transaction history.';
ShortcutKey = 'Shift+Ctrl+D';
ApplicationArea = Dimensions;
Image = Dimensions;
trigger OnAction()
begin
ShowDimensions;
end;
}
}
area(Reporting)
{
action(Print)
{
Caption = 'Print';
AccessByPermission = TableData "Incoming Document" = R;
ToolTip = 'Prepare to print the document. A report request window for the document opens where you can specify what to include on the print-out.';
ApplicationArea = Basic, Suite;
Image = Print;
Promoted = true;
PromotedCategory = Report;
trigger OnAction()
var
PurchInvHeader: Record "Purch. Inv. Header";
begin
CurrPage.SetSelectionFilter(PurchInvHeader);
PurchInvHeader.PrintRecords(true);
end;
}
action("Navigate")
{
Caption = 'Navigate';
ToolTip = 'Find all entries and documents that exist for the document number and posting date on the selected posted purchase document.';
ApplicationArea = Basic, Suite;
Promoted = true;
PromotedCategory = Report;
Scope = Repeater;
Image = Navigate;
trigger OnAction()
begin
Navigate;
end;
}
}
}
...
}
Based on code I have 4 tabs - Home, Actions, Navigate and Report. But I can’t add any button on the Home tab.
1 more point - when I uncomment the line “PromotedOnly = true;” then this Action disappears at all from any Ribbon.
Do you know how to fix it?
thanks in advance.