How to do it...

  1. Open your AL project in Visual Studio Code.
  2. In Explorer, create a new file named Register Manual Setups.al. In Editor, create a new codeunit object:
codeunit 50105 "Register Manual Setups"
{

}
  1. In Business Central, the handling of manual setups is done using what's referred to as a discovery pattern. When the page that contains all the manual setups loads, it fires an event that looks to see which manual setup pages should be loaded and then loads them. That makes it extremely easy for you to add your setup to the manual setup area!

To do this, we need to add a subscriber to our new codeunit object:

[EventSubscriber(ObjectType::Table, Database::"Business Setup", 'OnRegisterBusinessSetup', '', false, false)]
local procedure OnRegisterBusinessSetup(var TempBusinessSetup: Record "Business Setup")
var
TelevisionShowSetupNameTxt: Label 'Television Show Setup';
TelevisionShowSetupDescriptionTxt: Label 'Set up television
show application.';
KeyWordsTxt: Label 'television, show, tv, setup';
begin
TempBusinessSetup.InsertExtensionBusinessSetup(
TempBusinessSetup, TelevisionShowSetupNameTxt,
TelevisionShowSetupDescriptionTxt, KeyWordsTxt,
TempBusinessSetup.Area::Sales,
PAGE::"Television Show Setup Card", 'ALProject1');
end;

Now, let's check it out! Press F5 to build and publish your application:

  1. Switch to the Business Manager role center if you're not already on it. You can do that in My Settings.
  2. In the Business Manager role center, choose Setup & Extensions.
  3. Choose Manual Setup.
  4. Press Search.
  5. Type in television and press Enter.

You should see the Television Show Setup entry, as follows:

From here, you can click on Name and go to the Manual Setup page. Note that our Manual Setup page is empty as this is only to demonstrate how to add the setup to the Manual Setup area.

Note that since we added some additional keywords, when you perform the Search function, you can enter in any of those keywords and the setup page should be found. This makes it easier for your users to find things when they may refer to things by different names.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.99.7