I created my own table, extended the Customer Table to give Table Relation to those fields. Then on Card and had my table's field there. However, how do I have the New button so that once this page is opened which is a list page, a user can create a new record. Right now clicking on 'Select from full List' opens it without the option to create new. There is no button of a list page at all. Here is my code;
table 50131 "Sector" { DataClassification = ToBeClassified; fields { field(50000; "Code"; Code[20]) { DataClassification = ToBeClassified; } field(50001; "Description"; Text[50]) { DataClassification = ToBeClassified; } } keys { key(PK; Code) { Clustered = true; } } var myInt: Integer; trigger OnInsert() begin end; trigger OnModify() begin end; trigger OnDelete() begin end; trigger OnRename() begin end; }
tableextension 50121 "Customer Table Ext" extends Customer { fields { // Add changes to table fields here field(50001; "Customer Sector"; Code[20]) { TableRelation = Sector; } } var myInt: Integer; }
pageextension 50122 "Customer Card Ext" extends "Customer Card" { layout { // Add changes to page layout here addafter("Disable Search by Name") { field(recCategory; recCategory.Code) { ApplicationArea = All; TableRelation = Sector; } } } actions { // Add changes to page actions here } var recCategory: Record Sector; }