cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Unbihexium
Helper III
Helper III

Send Mail notification to the owner as soon ticket has status closed

I’ve modified the «service desk» template and I would like to implement the following at the “TicketdetailsPage ” :

As soon the ticket status is “closed” and the button “save” is hit it should send a mail notification to the owner of the ticket.

 

If("StatusCase" = "Geschlossen";
SubmitForm(TicketDetailsForm);
Office365.SendEmail("Tickets.Owner";  <---
 here is my problem
"Ticketsystem - Ticket ID: " & Value16-1 & Char(45) & Subject & " wurde geschlossen"; "Dein Ticket mit der ID " & Value16-1 & " wurde gelöst"
&Char(13) & " Abschluss-Kommentar: " & Value3 & Char(13)
& "Geschlossen durch: " & User().FullName)
;SubmitForm(TicketDetailsForm)
)

Have to mention, all user have a Office365 account,
and @ the “CreatenewticketPage” user are automatically detected with “User().FullName” equals “owner” in Excel-DB-sheet.

Probably I need to transform the User().FullName to User().Email but how??? o0

Would be thankful for any hint

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Unbihexium ,

Do you want to send an email to the owner of the Ticket when you click "Save" button within the TicketdetailsPage?

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

Firstly, you need to add a Office 365 Users connector as a data source within your app. Then modify the formula within the OnSelect property of the "Save" button within TicketdetailsPage to following:

If(
"StatusCase" = "Geschlossen"; SubmitForm(TicketDetailsForm); Office365.SendEmail(
LookUp(Office365Users.SearchUser(); DisplayName = TicketsGallery.Selected.Owner; Mail); /* <-- Modify formula here. Find the email address of the specific owner via the Owner name */ "Ticketsystem - Ticket ID: " & Value16-1 & Char(45) & Subject & " wurde geschlossen"; "Dein Ticket mit der ID " & Value16-1 & " wurde gelöst" &Char(13) & " Abschluss-Kommentar: " & Value3 & Char(13) & "Geschlossen durch: " & User().FullName
);SubmitForm(TicketDetailsForm) )

Note: I assume that the user use the Full Name as the Display Name within their Office 365 Profile.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-xida-msft
Community Support
Community Support

Duplicated

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xida-msft
Community Support
Community Support

Hi @Unbihexium ,

Do you want to send an email to the owner of the Ticket when you click "Save" button within the TicketdetailsPage?

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

Firstly, you need to add a Office 365 Users connector as a data source within your app. Then modify the formula within the OnSelect property of the "Save" button within TicketdetailsPage to following:

If(
"StatusCase" = "Geschlossen"; SubmitForm(TicketDetailsForm); Office365.SendEmail(
LookUp(Office365Users.SearchUser(); DisplayName = TicketsGallery.Selected.Owner; Mail); /* <-- Modify formula here. Find the email address of the specific owner via the Owner name */ "Ticketsystem - Ticket ID: " & Value16-1 & Char(45) & Subject & " wurde geschlossen"; "Dein Ticket mit der ID " & Value16-1 & " wurde gelöst" &Char(13) & " Abschluss-Kommentar: " & Value3 & Char(13) & "Geschlossen durch: " & User().FullName
);SubmitForm(TicketDetailsForm) )

Note: I assume that the user use the Full Name as the Display Name within their Office 365 Profile.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-xida-msft
Community Support
Community Support

Duplicated

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hello Kris


Thank you for your reply.

That was excactly what I've been looking for. Thank you so much! 


I had to type it like this: "LookUp('Office365-Benutzer'.SearchUser(); DisplayName = TicketsGallery.Selected.Owner; Mail);"

because of the language I guess ^^
It works perfectly!

Best regards

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (41,091)