Accessing custom url with javascript action

0
Hello everyone, I am trying to add a custom share button that allows a user to open an email in outlook and sends them a link directly to the page they are currently on. I want to be able to access the custom url created in the properties panel for each page.  I want to use something like this, export async function Open_Email_Help(emailAddress, username, customurl) {     // BEGIN USER CODE     window.location.href = 'mailto:emailAddress +’ ?subject=Share&body=%0D%0A%0D%0Acustomurl %0D%0A%0D%0ABest regards,%0D%0A'+ username;     // END USER CODE } I have no experience with javascript, only java, so I may need a somewhat thorough explanation. Thank you in advanced!
asked
2 answers
2

Hi Jonathan,

Have a look at the “Nanoflow commons” https://appstore.home.mendix.com/link/app/109515/ this contains actions “DraftEmail” and “Share

Cheers,

Andries

answered
0

If you do it this way, clicking on the button will open up outlook and create an email with as sendto-address the email adress of the user, setting him up to send an email to himself. Also you will depend on the user’s default mail-program.

Likely you are trying to create a button on a page that, upon being clicked, will send an email to email-address of the user, having the url  of the page in the body of the email. If so, read on, if not, sorry, my bad.

To do that, first setup your application to be able to send out emails. For instance by downloading and installing https://appstore.home.mendix.com/link/app/259/ or https://appstore.home.mendix.com/link/app/2461/

Once having that set up, check out this forum question https://forum.mendix.com/link/questions/101036 on the options to create a share button.

answered