quest
quest

Reputation: 107

Prompt options are required for Prompt dialogs (Parameter 'options')

I am suing MS Bot Framework and while routing from one waterfall Dialog to another, I am getting this error 'Prompt options are required for Prompt dialogs (Parameter 'options')'. Please help me what could be causing this. Call from Parent to Child dialog:

return await stepContext.BeginDialogAsync(DialogType.ChildDialog.ToString(), conversationData, cancellationToken);

inside ChildDialog:

public ChildDialog(
        IServiceProvider serviceProvider)
        : base(nameof(ChildDialog))
{
    _
    _conversationDataAccessor = serviceProvider.GetService<UserState>().CreateProperty<ConversationData>(nameof(ConversationData));
    _userState = serviceProvider.GetService<UserState>().CreateProperty<User>(nameof(User));

    var Test = new WaterfallStep[]
    {
        StepOne,
        StepTwo
    };

    _D1 = serviceProvider.GetService<D1>();
    _D2 = serviceProvider.GetService<D2>();

    AddDialog(new WaterfallDialog(nameof(Test), Test));
    AddDialog(new TextPrompt(DialogIds.ChildDialog));
    AddDialog(D1);
    AddDialog(D2);
}

Upvotes: 2

Views: 470

Answers (1)

Saeed Bolhasani
Saeed Bolhasani

Reputation: 580

I had same issue and i realized that InitialDialogId property in child dialog was missing.

this.InitialDialogId = nameof(Test);

It seems you have missing too.

Upvotes: 5

Related Questions