Share via

Access customParameters or any object(not defined as property in Activity class) from Activity class in QnAMaker-all features bot framework code

SAURAV SINGH 1 Reputation point
2021-11-18T11:03:55.78+00:00

I am using QnAmaker-all features C# dotnet sample code to work with. For my task I am passing some extra parameters from webchat UI and want to receive in activity context in the bot framework code. But it gives error like this :
error CS1061: 'object' does not contain a definition for 'customParam' and no accessible extension method 'customParam' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) [D:\local\Temp\zipdeploy\extracted\QnABot.csproj]

this is the bot code where i access the data from the Activity: 150671-image.png

this is how I am passing data with name customParam from my webchat UI:
150569-image.png

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.