Have existing classic customization code that when a button is clicked it gathers some information formats an email body and sends an email
Need to move this to Kinetic and have created a function to gather the information and format the body of the email
Also have created a Data Directive that calls my function and then passes return values to the Send Email widget and email is sent successfully
Questions:
Is this the proper/best approach considering moving from custom code in classic to my options in Kinetic and the desire to send an email ?
In my Data Directive I can use the “callContextClient.CurrentUserId” to determine the user, but how do I get the user’s email address from the userId ?
I figured using the email widget was the easiest way to send an email without using additional code in my function
Yes, I’d prefer to kick it off using a button click event, but I saw another posting here regarding using a UD field that you modify that calls a BPM and sends an email
But I really don’t want the user to have to modify a field to kick it off
I’m still building it out…looking for ideas…fairly new at this
Originally I just wanted a button that calls a function and sends the email,
but the customization code I was starting with from classic looked overly complicated as far as sending the email went and I didn’t find an example here for doing it in a function.
But your post looks great, examples like that are what I am always looking for, I’m going to head down that path now
This should still primarily be a back-end task, so your approach is fine. Don’t get caught up in the “everything must happen in App Studio now!” because that is wildly wrong. Most things should be moving to the server with App Studio being the new front-end.
Kevin is correct. Use that to link to UserFile and get their email from there.
Not sure with the widget, but if you use code and System.Net.Mail, you can set IsBodyHtml to true.