@microsoft/teams-js 2.18.0 doesn't support dialog.submit()

Priya Repaka 0 Reputation points
2024-01-17T12:14:42.9233333+00:00

I currently use microsoft/teams-js sdk of 2.6.0 version. I wanted to move to 2.18.0 and I see that there is no support for microsoftTeams.dialog.submit() in 2.18.0. Is there any replacement for this? How should I proceed with submitting a task module in 2.18.0?

Microsoft Teams Development
Microsoft Security Microsoft Graph
Microsoft Teams Microsoft Teams for business Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Prasad Das 5 Reputation points
    2024-01-17T13:40:54.0466667+00:00

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Prasad-MSFT 8,981 Reputation points Microsoft External Staff Moderator
    2024-01-18T04:15:59.41+00:00

    The tasks namespace is replaced by the dialog namespace. The dialog namespace includes sub-namespaces for HTML (url), Adaptive Card (adaptiveCard), and bot-based (dialog.url.bot and dialog.adaptiveCard.bot) functionality.

    tasks.submitTask ==> dialog.url.submit (renamed)

    The below example shows submitting the results of a dialog:

    function validateForm() {
        var customerInfo = {
            name: document.forms["customerForm"]["name"].value,
            email: document.forms["customerForm"]["email"].value,
            favoriteBook: document.forms["customerForm"]["favoriteBook"].value
        }
        microsoftTeams.dialog.url.submit(customerInfo, "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
        return true;
    }
    

    https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/task-modules/task-modules-tabs?tabs=teamsjs%2Cteamsjs3#example-of-submitting-the-result-of-a-dialog

    Thanks, 

    Prasad Das

    ************************************************************************* 

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    0 comments No comments

Your answer

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