Help with script triggers inside portal
I get the feeling the solution to this problem is a simple one, I just don't know what it is.
I have a portal on my main database, and it shows records and fields from a related database. One of the fields in the portal is a status field. What I'm trying to do is get it to run a script that sends an email when that status is changed to a specific user through the portal on the main page (as opposed to changing it on the related database).
So far everything is working. I set a script trigger on the status field in the portal to run the "send email" script when a certain user's name is chosen, and it works. However, it only works for the first related record.
In any given job, there will be multiple related records assigned to that job, hence the need for a portal to see them all at once. So in a job with 10 related records, changing the status of the first related record to a certain user will send the email via the script trigger. It doesn't work if I change the status on the second or third or any other record in the portal.
How do I fix it so that changing the status on the thrid (or any other) record will send an email via the script trigger? Or to put it another way, why is the script trigger only affecting the first record in the portal?
Thanks for any help.