Send notification with selected record list items from Ui Builder

sanjusanju2
Tera Expert

Hi All,

i have requirement where i have a list of items created using ui builder list component. User can select the items from the list and when user click on send email button. 

All the selected items display values get created as a email body and send it to the user.

 

sanjusanju2_0-1767103217409.png

As per above screen user can select the records and when it click on the Generate Email button notification should include all above selected items in the mail body.

 How i can achieve this. Please let me know exact steps and changes required.

 

3 REPLIES 3

Matthew_13
Mega Sage

Hi There - You can definitely do this with the UI Builder list component.

Here’s how it usually works:

  1. Let users select multiple items in the list make sure multi-select is enabled.

  2. When they click your Generate Email button, capture those selected items from the list.

  3. Loop through the selected items to gather the details you want to include in the email body.

  4. Send that info as an email  you can do this by triggering a Flow Designer flow or calling a server-side script that sends the email to the user.

@sanjusanju2 - Please mark as Accepted Solution and Thumbs Up if you find Helpful!!

Hi Mathew,

 

Thanks for your answer, But i am not able to call any server side script from the button.

i tried using below ways, but it did not worked for me.

1 - Using declarative action implemented as server side script. Problem i am facing it is getting triggered for each and every selected record and second is not able to call any script include. function from here.

2- Created a Ui Builder action button, But Problem is same calling of a script include function are not happening. Not sure how we can call a script include function from here.

 

Can you please suggest me with some example code, which i can use to call from Ui builder component? 

i have written a script include which is working fine to send an email. But i did not find a way to call that script include methods from ui builder component.

 

Thanks in Advance.

Hi @sanjusanju2 ,

Create a transform data broker , in that call the script include you have already did.

refer this article to how to create transform data broker(main usage is call the server side script from the ui builder)

How to call Server Script from UI Builder

After Selecting the records then you click on the Generate Email Button, in ui builder there is a event called Button Clicked there add this newly created transform data broker by sending the selected sysID's as the input to the data broker.

If my response finds correct, mark it as helpful.