Is it possible to present the HTML in the Email body as an Image in a portal widget?

tor-werner
Giga Contributor

As we know the Body part of sys_email contains HTML code that can be previewed by pressing the 'Preview HTML body' button.
I stripped much of the HTML code so I ended up with a preview in my example below.

Is it possible to get a portal widget to read and present the same as we see here?

A possible solution could be to define an Inbound Email Action that reads this particular mail, then a script that strips the HTML code in the body, same way as I did manually. But from here and to get it presented in the Portal, my knowledge stops. I don't even know if it is possible.

find_real_file.png

1 ACCEPTED SOLUTION

Matthew Glenn
Kilo Sage

If I understand you correctly, it's possible and we're doing something similar.



You can have your widget either read directly from the sys_email table, or, as you said, you can use an inbound action and then read that target record. The latter is what we've done.



In your inbound action, use 'email.body_html' to grab the html of the inbound notification and copy that to an HTML field on your target table.



From there, in your widget, grab the displayValue() of that HTML field and you'll have what you see in the email.



Here's the inbound email we received


Screen Shot 2018-02-01 at 23.16.54.png



Here's what it looked like displayed on our Portal


Screen Shot 2018-02-01 at 23.19.25.png




If you need any more info, I'd be happy to help.


View solution in original post

6 REPLIES 6

I don't believe there's a way for you to embed a widget into an email. However, you could create an email notification script that looks like the widget, displaying the same information you do in the portal widget, performing the same queries to gather the info.

There's going to be some limitations with this, but I believe it'd accomplish what you need, although I'm not 100% sure if it's what you're looking for.

More info on Notification Email Scripts can be found here

Hopefully this helps

sax10or
Tera Contributor

Hi Matthew,

Thank you for your quick answer.

My customer instance is on-premise.

So i was thinking of retrieving the webpage url and then creating an image stored as png (db_image).

Then to paste that image into the body of the notification by email script.

 

Do you think it is possible ?