web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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 

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    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;
            }

  • Suggested answer
    keoma99 Profile Picture
    138 on at
    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
    Valentin Castravet Profile Picture
    31,481 Super User 2025 Season 2 on at
    It looks like this has been mentioned in the ideas website  as well - Microsoft Idea
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans