-
Notifications
You must be signed in to change notification settings - Fork 691
Closed
Closed
Copy link
Labels
SCMGitHub request for SCM areaGitHub request for SCM areaevent-requestRequest for adding an eventRequest for adding an eventships-in-future-updateFix ships in a future updateFix ships in a future update
Description
Why do you need this change?
In 4PS Construct we also create appointments for attendees with "Attendee Type" = Contact.
Describe the request
Dear ALAppExtensions team,
On behalf of 4PS I would like to request integration event 'OnProcessAttendeeAppointmentOnAfterFindAttendeeTask' to be added to procedure ProcessAttendeeAppointment in table 5080 "To-do".
local procedure ProcessAttendeeAppointment(Task: Record "To-do"; var Attendee: Record Attendee)
var
Task2: Record "To-do";
Salesperson: Record "Salesperson/Purchaser";
Salesperson2: Record "Salesperson/Purchaser";
ExchangeWebServicesServer: Codeunit "Exchange Web Services Server";
Mail: Codeunit Mail;
Appointment: DotNet IAppointment;
SalesPersonList: Text;
Body: Text;
begin
if CreateExchangeAppointment then
InitializeExchangeAppointment(Appointment, ExchangeWebServicesServer);
repeat
//if FindAttendeeTask(Task2, Attendee) then //old
if FindAttendeeTask(Task2, Attendee) then begin //new
OnProcessAttendeeAppointmentOnAfterFindAttendeeTask(Attendee, Task, Task2, SalesPersonList, CreateExchangeAppointment); //new
if Attendee."Attendee Type" = Attendee."Attendee Type"::Salesperson then
if Salesperson2.Get(Task2."Salesperson Code") and
Salesperson.Get(Task."Salesperson Code")
then
if CreateExchangeAppointment then begin
UpdateAppointmentSalesPersonList(SalesPersonList, Salesperson2.Name);
if Salesperson2."E-Mail" <> '' then
AddAppointmentAttendee(Appointment, Attendee, Salesperson2."E-Mail");
end else begin
Body := MakeAppointmentBody(Task, Salesperson2.Name, Salesperson.Name);
if Mail.NewMessage(Salesperson2."E-Mail", '', '', Task2.Description, Body, '', false) then
SetAttendeeInvitationSent(Attendee)
else
Message(Text023, Attendee."Attendee Name");
end
else begin
LogTaskInteraction(Task, Task2, true);
SetAttendeeInvitationSent(Attendee);
end;
end; //new
until Attendee.Next() = 0;
if CreateExchangeAppointment and (SalesPersonList <> '') then begin
Body := MakeAppointmentBody(Task, SalesPersonList, Salesperson.Name);
Appointment.Body := Body;
SaveAppointment(Appointment)
end;
end;
[IntegrationEvent(false, false)]
local procedure OnProcessAttendeeAppointmentOnAfterFindAttendeeTask(var Attendee: Record Attendee; var Task: Record "To-do"; var Task2: Record "To-do"; var SalesPersonList: Text; CreateExchangeAppointment: Boolean)
begin
//new
end;
Internal work item: AB#621712
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SCMGitHub request for SCM areaGitHub request for SCM areaevent-requestRequest for adding an eventRequest for adding an eventships-in-future-updateFix ships in a future updateFix ships in a future update