Add the Customer Rewards Wizard page to the assisted setup

Completed

Assisted setup provides step-by-step guidance that helps simplify the process of setting up complex features.

The Assisted Setup module provides capabilities for:

  • Adding an assisted setup guide for a given extension, page ID, an optional video link that explains the feature, and a help link where the user can read more about it.

  • Adding a translation for the name of the setup record. This feature is helpful when the extension is available in multiple languages.

  • Checking whether a user has already completed the steps in an assisted setup guide.

  • Completing an assisted setup guide, directly from the guide, when the user selects Finish.

  • Running an assisted setup guide page that takes the user through the various steps to set up an extension.

The Base Application adds several assisted setup guides by subscribing to the OnRegister event. In the following example, the Customer Rewards Wizard page is added to the Assisted Setup through the API that is exposed for the module. Additionally, the English (United States) translation for the name is added.

codeunit 50102 "Cust Rewards Assisted Setup"
{
    trigger OnRun()
    begin

    end;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Guided Experience", 'OnRegisterAssistedSetup', '', false, false)]
    local procedure AddExtensionAssistedSetup_OnRegisterAssistedSetup();
    var
        GuidedExperience: Codeunit "Guided Experience";
        CurrentGlobalLanguage: Integer;
        myAppInfo: ModuleInfo;
        WizardTxt: Label 'Customer Rewards assisted setup guide';
        GuidedExperienceType : Enum "Guided Experience Type";
        VideoCategory : Enum "Video Category";
    begin
        NavApp.GetCurrentModuleInfo(myAppInfo);
        CurrentGlobalLanguage := GlobalLanguage();
        GuidedExperience.InsertAssistedSetup(WizardTxt, WizardTxt, WizardTxt,5,ObjectType::Page,page::"Customer Rewards Wizard","Assisted Setup Group"::Extensions,'',VideoCategory::Uncategorized,'');
        GLOBALLANGUAGE(1033);
        GuidedExperience.AddTranslationForSetupObjectTitle(GuidedExperienceType::"Assisted Setup", ObjectType::Page,Page::"Customer Rewards Wizard", CurrentGlobalLanguage, WizardTxt);
    end;
} 

After you add this codeunit to the Customer Rewards extension, and after you've published the extension, you can go to the Assisted Setup page. On this page, notice that an entry has been added for the Customer Rewards Wizard page.

Screenshot of the Assisted Setup page with the Customer Rewards assisted setup guide highlighted.

When you select the entry for the Customer Rewards extension on the Assisted Setup page, the Customer Rewards Wizard page runs. After the Customer Rewards Wizard page has run and has successfully completed, the Completed field on the Assisted Setup page will be set to true.