on ‎2022 Jun 20 2:17 PM
Hi all,
We are struggling with an issue of the JavaScript integration into HTML code while creating a business rule in FSM.
The business case is that we want to use several equipments in one service call. After assignment of the related activity to the technician, he should receive an email with the list of the affected equipments. For one equipment, this works very well.
Here is the example when one equipment is listed

We want to loop over all assigned equipments and want to display them in a HTML table row. To realize that, we want to add related Javascript code into the HTML source within the <script>-tags.

After saving the source and reopen it, the tags <script> and the content in-between are deleted. Moreover, the code is not executed when assigning new activities to orders.
Do you have any idea how we can solve this situation?
Best regards,
Christoph
Request clarification before answering.
Hi Christoph, It is not possible to use the script tags in an email. We would propose to use a variable (i.e equipments) for your array and then in the email you could access these equipments via this variable and print them out using a script like below:
${equipments.map(function(equipment){return "id: " + equipment.id + " name: " + equipment.name + " code: " + equipment.code})}If this is not sufficient, can you please send me what you are trying to do in the script?
Kind Regards,
Wendy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 6 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.