Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Create To-do with type Meeting is not possible

(1) ShareShare
ReportReport
Posted on by 15

Hello

I am creating a salesperson task (to-do) from task list > Create new task in Azure Version 20.4.44313.44365

When I select Type = Meeting, I get the error "You cannot create a task of type Meeting because you’re not using an on-premises deployment"

pastedimage1661178097293v1.png

This is either a bug or a change with the new updates, as it was possible to create to-do in some of the previous version 

  • Suggested answer
    Valentin Castravet Profile Picture
    27,611 Super User 2025 Season 1 on at
    Create To-do with type Meeting is not possible
    It looks like this has been mentioned in the ideas website  as well - Microsoft Idea
     
     
  • Suggested answer
    keoma99 Profile Picture
    124 on at
    Create To-do with type Meeting is not possible
    Obviously Microsoft ignores that feature.
    The code in field Type in To-do table says, that Type Meeting is only usable in onPrem environments, what makes no sense at all.
    It also strange that the table is called To-do and the page is called Task. No clean architecture.
     
    So following is the solution.
     
    Create a subscriber CU;
     
    codeunit 50100 MySubsribers
    {
        [EventSubscriber(ObjectType::Table, Database::"To-Do", 'OnBeforeValidateType', '', false, false)]
        local procedure ToDoBeforeValidateType(var Task: Record "To-do"; xTask: Record "To-do"; var IsHandled: Boolean)
        begin
            IsHandled := true;
        end;
    }
     
    Additional a function for Sending invitations is missing.
     
    For that you can use the following code:
     
    pageextension 50100 "Task Card" extends "Task Card"
    {
        actions
        {
            addafter(MakePhoneCall)
            {
                action("Send Invitations")
                {
                    ApplicationArea = RelationshipMgmt;
                    Caption = 'Send Invitations';
     
                    trigger OnAction()
                    var
                        Mail: Codeunit "Mail Management";
                        MailItem: Record "Email Item";
                        Attendee: record Attendee;
                    begin
                        Attendee.SetRange("To-do No.", Rec."No.");
                        Attendee.SetRange("Send Invitation", true);
                        Attendee.SetRange("Invitation Sent", false);
                        if Attendee.FindSet() then
                            repeat
                                MailItem.SetBodyText(StrSubstNo('Hi %1, please take part.', Attendee."Attendee Name"));
                                MailItem.Subject := StrSubstNo('%1 - %2 - %3', Rec.Description, Rec.Date, Rec."Start Time");
                                MailItem."Send to" := GetMailAddress(Attendee);
                                if not Mail.CheckValidEmailAddress(MailItem."Send to") then
                                    error('Mail Address not valid.');
                                Mail.SetHideMailDialog(true);
                                if not Mail.Send(MailItem, "Email Scenario"::Notification) then
                                    error('Error occured when sending Mails. Please check logging.');
                            until Attendee.Next() = 0;
                    end;
                }
            }
        }
     
        local procedure GetMailAddress(Attendee: record Attendee): Text
        var
            Contact: Record Contact;
            SalesPerson: Record "Salesperson/Purchaser";
        begin
            if Attendee."Attendee Type" = Attendee."Attendee Type"::Contact then
                if Contact.Get(Attendee."Attendee No.") then
                    exit(Contact."E-Mail");
     
            if Attendee."Attendee Type" = Attendee."Attendee Type"::Salesperson then
                if SalesPerson.Get(Attendee."Attendee No.") then
                    exit(SalesPerson."E-Mail");
        end;
    }
     
    you can add some code for setting field "Invitation Sent" to true.
     
    cheers

    Dipl.Ing. Franz Kalchmair

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Create To-do with type Meeting is not possible

    I checked the code an it is no a bug. The code clearly states that it is by design. But i can not really tell you the reasoning behind it. Maybe someone else here can fill it with the reason.

     field(8; Type; Enum "Task Type")
            {
                Caption = 'Type';
    
                trigger OnValidate()
                var
                    EnvironmentInfo: Codeunit "Environment Information";
                    OldEndDate: Date;
                    IsHandled: Boolean;
                begin
                    IsHandled := false;
                    OnBeforeValidateType(Rec, xRec, IsHandled);
                    if IsHandled then
                        exit;
    
                    if EnvironmentInfo.IsSaaS() and (Type = Type::Meeting) then
                        Error(MeetingSaaSNotSupportedErr);
    
                    if "No." <> '' then begin
                        if ((xRec.Type = Type::Meeting) and (Type <> Type::Meeting)) or
                           ((xRec.Type <> Type::Meeting) and (Type = Type::Meeting))
                        then
                            Error(Text012);
                    end else begin
                        if CurrFieldNo = 0 then
                            exit;
    
                        if not IsMeetingOrPhoneCall(xRec.Type) then
                            TempEndDateTime := CreateDateTime(xRec.Date, xRec."Start Time") - OneDayDuration   xRec.Duration
                        else
                            TempEndDateTime := CreateDateTime(xRec.Date, xRec."Start Time")   xRec.Duration;
    
                        OldEndDate := DT2Date(TempEndDateTime);
    
                        if IsMeetingOrPhoneCall(xRec.Type) and not IsMeetingOrPhoneCall(Rec.Type) then begin
                            "Start Time" := 0T;
                            "All Day Event" := false;
                            SetDuration(OldEndDate, 0T);
                        end;
    
                        if not IsMeetingOrPhoneCall(xRec.Type) and IsMeetingOrPhoneCall(Rec.Type) then begin
                            "Start Time" := 0T;
                            if OldEndDate = Date then begin
                                SetDuration(OldEndDate, DT2Time(CreateDateTime(OldEndDate, 0T)   30 * 60 * 1000));
                            end else
                                SetDuration(OldEndDate, 0T);
                        end;
                    end;
                end;
            }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans