ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 8616 Config. Management FindPage Function

Open j-wilder opened this issue 8 years ago • 1 comments

The FindPage function in Codeunit 8616 Config. Management Codeunit needs an event at the bottom. It is a huge Case statement where you pass in the Table and it returns the Page ID that then gets populated on the Config. Package Table.

DATABASE::"Source Code Setup": EXIT(PAGE::"Source Code Setup"); ELSE
//EXIT(0); //Remove this OnIfNoPageFound(TableID); //Add Publisher Event END;

j-wilder avatar Nov 02 '18 16:11 j-wilder

This function could be even better if the event was on the top and exited if a PageID was returned. This way you can choose pages for custom tables but also override existing pages if for some reason you wanted to. [External] FindPage(TableID : Integer) ReturnPageID : Integer

OnBeforeGetPageID(TableID,ReturPageID); IF ReturnPageID <> 0 THEN EXIT(ReturnPageID);

CASE TableID OF DATABASE::"Company Information": EXIT(PAGE::"Company Information"); DATABASE::"Responsibility Center":

Signature of Event looks like this: LOCAL [IntegrationEvent] OnBeforeGetPageID(TableID : Integer;VAR PageID : Integer)

j-wilder avatar Nov 02 '18 20:11 j-wilder