cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jestes
New Member

Shoutouts Template - Hardcode an email receipient

I am customizing the Shoutouts Powerapp that MS provides. It is designed to send a shoutout to the receiver, and their manager from Active Directory. I want to hardcode in our Human Resources email into the process so she gets notified when someone sends a shoutout. how would I do this? I imagine it would just be as simple as adding something here on the confirm message screen button.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Shoutouts Template - Hardcode an email receipient

Hi @jestes 

 

The email is sent from the Confirmation screen and not on click of the button

 

On the OnVisible property of the SendConfirmationScreen

Add your hardcoded email(s) as shown below 

 

// Set email recipients. If shoutout recipient isn't internal, don't search for or include their manager
Set(_emailRecipients, _selectedUser.UserPrincipalName & ";hardcodedemail" &
If(_selectedUser.isInternal || Lower(_selectedUser.CompanyName) = Lower(_myProfile.CompanyName),
";" & Office365Users.Manager(_selectedUser.UserPrincipalName).UserPrincipalName
)
)

 --------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
GarethPrisk Impactful Individual
Impactful Individual

Re: Shoutouts Template - Hardcode an email receipient

Are you sending the email using the Office 365 Outlook connector?

If so, add a CC line and hard-code in the HR email.

https://docs.microsoft.com/en-us/connectors/office365/#send-an-email-(v2)

Dual Super User
Dual Super User

Re: Shoutouts Template - Hardcode an email receipient

Hi @jestes 

 

The email is sent from the Confirmation screen and not on click of the button

 

On the OnVisible property of the SendConfirmationScreen

Add your hardcoded email(s) as shown below 

 

// Set email recipients. If shoutout recipient isn't internal, don't search for or include their manager
Set(_emailRecipients, _selectedUser.UserPrincipalName & ";hardcodedemail" &
If(_selectedUser.isInternal || Lower(_selectedUser.CompanyName) = Lower(_myProfile.CompanyName),
";" & Office365Users.Manager(_selectedUser.UserPrincipalName).UserPrincipalName
)
)

 --------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,805)