How to action a trigger after form close?
Hi, am wondering how can i action the update trigger after i close the edit window? What is happening it keeps on sending numerous notifications on every field i update which is cumbersome. I want to send only one notification after i am done will all my changes on a record.
let t := this;if Service != null and 'Assigned To' != null and Subject != null and Type != null and Department = null then let staff_name := record(Staff,number(Requester)).'Full Name'; let ticket_type := record('Ticket Types',number(Type)).Name; let receiver_address := record(Staff,number('Assigned To')).email; let requester_address := record(Staff,number(Requester)).email; sendEmail({ from: "supportdesk@company.com", to: requester_address, cc: receiver_address, subject: "You you have an update on ticket number " + 'Ticket Number', html: "Suport HelpDesk Notifications" + "" + "
" + "" + "" + "" + "" + "
Ticket Update Notification
" + "" + "
" + "" + "" + "" + "
" + "
" + "Hello " + "" + staff_name + "" + "," + "
" + "
" + "You have an update on your recent ticket. Track your ticket progress with the details below." + "
" + "
" + "Ticket Details" + "
" + "
" + "
" + "Ticket Number: " + "" + 'Ticket Number' + "" + "
" + "
" + "Ticket Status: " + "" + Status + "" + "
" + "
" + "Priority: " + "" + Priority + "" + "
" + "
" + "Ticket Type: " + "" + ticket_type + "" + "
" + "
" + "Ticket Solution: " + "" + Solution + "" + "
" + "
" + "Ticket Comment: " + "" + Comments + "" + "
" + "
" + "Ticket Url: " + "" + "" + urlOf(this) + "" + "
" + "
" + "
" + "
" + "Best Regards," + "
" + "
" + "Support HelpDesk" + "
" + "
" + "If you shouldn't be receiving this alert, please contact IT Support HelpDesk via Email: itsupport@company.com" + "" + "
" + "
" + "© " + year(today()) + " company - Powered by IT Team." + "
" + "
" + "" + "
My update script those codes above
4 replies
-
I'm not 100% sure but try this:
If you don't have one on your form already, add a Tab. Place your code in the Trigger after hide option of the tab. If you only have one tab and don't want a second make it the first element of the table and it will replace the default tab.
Although it says 'after hide' I am sure the field values are still available to the script.
Let me know if it works.
Regards John
-
Thanks John, let me try those options as advised.
Content aside
- 2 yrs agoLast active
- 4Replies
- 183Views
-
2
Following