Automatic Update Integer Field when send a Email
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 09:13 AM
Hey guys!
Basically I need there to be a Business Rule so that when I send an email from a certain table, the increment field in that table counts +1, thus updating the subject of the email.
I already have the increment fields etc, I'm having difficulty writing the code.
How could I write this code, can anyone help me?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 10:56 AM - edited ‎02-27-2025 10:57 AM
Hello @luizmarcond
Here is what I did:
1. Created a dummy table
2. Created a Before Business Rule (when record is inserted):
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
current.u_increment = current.u_increment + 1;
})(current, previous);
3. Created a dummy e-mail notification whenever record is inserted or updated:
4. Created a record on dummy table/form:
Before
After
Here is the e-mail log
Hope that helps!