To extend an existing CTI factbox it with additional information,two page extensions are required: One for the Factbox that is to be extended and another for the Caller Card on which the factbox is to be placed.
To display additional information in an existing factbox, you can extend the factbox page.
The following example shows a PageExtension for the factbox "SIM_CTI Call-In Sales FB",
where a new field for the number of shipping documents (Sales Shipments) is added:
pageextension50120"DocuExtendingFactbox"extends"SIM_CTICall-InSalesFB"{ layout { addafter("StrSubstNo('%1',SalesCreditMemoCount)") { field("Sales Shipment"; GlobalSalesShipmentAmountInteger) { ApplicationArea = all; Caption = 'Sales Shipments'; ToolTip = 'Here you can see the Posted Sales Shipments Entries for the Current Customer'; trigger OnDrillDown() var LocalPostedSalesShipmentsPage: Page "Posted Sales Shipments"; begin LocalPostedSalesShipmentsPage.Run(); end; }}}varGlobalSalesShipmentAmountInteger:Integer;procedureCalcEntries(ParamCustomerCode:Code[20])varLocalSalesShipmentHeaderRecord:Record"SalesShipmentHeader";beginLocalSalesShipmentHeaderRecord.Reset();LocalSalesShipmentHeaderRecord.setrange("Sell-toCustomerNo.",ParamCustomerCode);GlobalSalesShipmentAmountInteger:=LocalSalesShipmentHeaderRecord.Count;end;}
The Page Extension for the Caller Card transfer the necessary data to enable the factbox updates.
In the following example, the PageExtension ensures that the factbox is updated with the current customer number:
pageextension50119"DocuCTI"extends"SIM_CTICallInCust.-Sales"{ trigger OnOpenPage() begin CurrPage.SIM_CTISalesFB.Page.CalcEntries(Rec."No."); end;}
The "CTI Documentation Factbox" will now be placed below the existing "Sales Information" factbox on the "CTI Call In Customer - Sales" Caller Card and
provides additional information about the customer's shipping history directly on the Caller Card.