AnsweredAssumed Answered

How to loop through multiple records in email alert?

Question asked by Erica Barnetts on Oct 6, 2014
Latest reply on Oct 7, 2014 by Rob Colquhoun
I have a problem with SugarCRM 6.5.16 (Professional) I was hoping someone could help with. I need to figure out how to loop through multiple records in an email alert.

Allow me to explain what I'm trying to do. Our company deals with real estate loans for commercial properties. Therefore, one loan might have multiple properties associated with it.

So, for example, we have a Loan module containing a single record with all the details of the loan. There is also a Properties module linked back to the Loan module. Within the Properties module, there might be 4 records of different apartment buildings.

Let's say for example, Loan X has been approved. Now, we need to trigger an email notification to notify people that Loan X was approved, but we need to have that email contain the address and images from Property A, B, C, and D.

You see my dilemma? The custom email template in SugarCRM allows me to select a Related Module, but I can only pull in ONE record from the Related Module. How do I make it display all 4 of those associated Properties records?

Is there any way to accomplish this?

Outcomes