ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 1990 "Guided Experience" - OnBeforeInsertAssistedSetup

Open Mike-1984 opened this issue 4 years ago • 9 comments

Hello colleagues,

We would like to request an event in Codeunit 1990 "Guided Experience". We want the ability to check/change some parameters of the assisted setups before inserting For example, We want to change the group for the assisted setups

We believe this requirement can be achieved by implementing the following event:

    procedure InsertAssistedSetup(Title: Text[2048]; ShortTitle: Text[50]; Description: Text[1024]; ExpectedDuration: Integer; ObjectTypeToRun: ObjectType; ObjectIDToRun: Integer; AssistedSetupGroup: Enum "Assisted Setup Group"; VideoUrl: Text[250]; VideoCategory: Enum "Video Category"; HelpUrl: Text[250])
    var
        CallerModuleInfo: ModuleInfo;
        GuidedExperienceType: Enum "Guided Experience Type";
        ManualSetupCategory: Enum "Manual Setup Category";
        SpotlighTourType: Enum "Spotlight Tour Type";
        SpotlightTourTexts: Dictionary of [Enum "Spotlight Tour Text", Text];
    begin
        NavApp.GetCallerModuleInfo(CallerModuleInfo);
        // +++++++
        OnBeforeInsertAssistedSetup(ObjectTypeToRun, ObjectIDToRun, Title, ShortTitle, Description, ExpectedDuration, AssistedSetupGroup, VideoUrl, HelpUrl);
        // -------
        GuidedExperienceImpl.Insert(Title, ShortTitle, Description, ExpectedDuration, CallerModuleInfo.Id, GuidedExperienceType::"Assisted Setup",
            ObjectTypeToRun, ObjectIDToRun, '', AssistedSetupGroup, VideoUrl, VideoCategory, HelpUrl, ManualSetupCategory::Uncategorized, '',
            SpotlighTourType::None, SpotlightTourTexts, true);
    end;

Event Signature:

    [IntegrationEvent(false, false)]
    local procedure OnBeforeInsertAssistedSetup(ObjectTypeToRun: ObjectType; ObjectIDToRun: Integer; var Title: Text[2048]; var ShortTitle: Text[50]; var Description: Text[1024]; var ExpectedDuration: Integer; var AssistedSetupGroup: Enum "Assisted Setup Group"; var VideoUrl: Text[250]; var HelpUrl: Text[250])
    begin
    end;

Best regards, Mike

Mike-1984 avatar Nov 04 '22 12:11 Mike-1984

Hi @Mike-1984 ,

May I ask more details about your use case here?

I assume you want to validate the user's input when they try to insert a new AssistedSetup from Web Client. If that's the case, would it be a good idea to use a page extension and add some OnValidate triggers there instead? This way, you could also check for OnModify

haoranpb avatar Jan 03 '23 10:01 haoranpb

Hi @Mike-1984 , thanks for raising the issue, but I will be closing it for now, as it has been a while and we didn't agree on the design.

Feel free to re-open it when you get time, so we can continue our discussion 😄

haoranpb avatar Feb 28 '23 12:02 haoranpb

Hi @haoranpb, Sorry for the late reply.

Page "Assisted Setup" is not editable and user input is not expected on this page. : page 1801 "Assisted Setup" { Editable = false; InsertAllowed = false; LinksAllowed = false; ModifyAllowed = false; SourceTable = "Guided Experience Item"; SourceTableTemporary = true; The page is based on a temporary table and populated dynamicly when the page is opened. It uses codeunit Guided Experience for that.

The page shows a user which parts of the system he must configure.

Our solution provides a set of our own assisted setups, but we also rely on standard Microsoft's assisted setups.

In order to imrove user expirence, we would like to re-arrange the order and change some values of Microsoft's standard assisted setups. For example, we would like to change Microsoft's assisted setups:

Description (We can provide a better description, which is more relevant for our customers and represents business aspects they understand), Expected duration (We have additional steps and settings which change the requited time to complete the setup) Group (We provide a different logical grouping which suites our customers better) Video link (We will provide a video for Microsoft's assisted setups).

Microsoft's assisted setups are created in codeunit codeunit 1814 "Assisted Setup Subscribers" and they use GuidedExperience.InsertAssistedSetup to register them.

This is exactly the place where we would like to change them (using a requested event in GuidedExperience.InsertAssistedSetup function)

Mike-1984 avatar Mar 14 '23 17:03 Mike-1984

Re-opening with latest information

haoranpb avatar Mar 17 '23 11:03 haoranpb

Hello colleagues, @JesperSchulz, @AlexanderYakunin It seems like this event request has been forgotten.

Or is there anything else expected from my side?

Mike-1984 avatar Aug 03 '23 10:08 Mike-1984

I will ping the owning team! They will get back to you!

JesperSchulz avatar Aug 09 '23 07:08 JesperSchulz

Hi @Mike-1984 Just curious - if you were able to do this, would you then lead the user to the list of Assisted Setups to perform the needed setup steps? I am asking because the current thinking is not to lead users there for specific setup tasks to perform. For that we have the checklist system. Users should be led into the Assisted Setup list if they want to browse which things can be set up, get inspired, and see if there is anything they like (like a menu in a restaurant).

If you want to guide the user through, say, 5 specific things to set up, the idea is that you add assisted setups, or use standard Microsoft ones, and change their descriptions as it appears it the checklist. When using the Microsoft assisted setups, you would then insert a new Guided Experience Item of type = codeunit, which will run the standard assisted setup. This allows you to modify the title, description and duration parameters for when showing it in the checklist. I get that this Guided Experience Item does not show up in the Assisted Setup because it's a codeunit.

Let me know what it is you want to achieve:

  1. Guide the user to the menu from where they pick and choose their meal/business value: Assisted Setup list
  2. Guide the user through known steps, setups, etc.: The Checklist

Then we can guide you from there.

Thank you!

ghost avatar Aug 18 '23 08:08 ghost

Close for now as there is no update Feel free to re-open it when you get time.

Groenbech96 avatar Oct 04 '23 11:10 Groenbech96

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: .

JesperSchulz avatar Oct 06 '23 06:10 JesperSchulz