- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 12:13 AM
Hi Community,
I have a requirement where - 'If system receives an email through inbound email action then the instance email id is stored in the Recipients (String field) field by default.
How to remove the instance email id from Recipients field. What script needs to be used ?
In the above screenshot, Out of 4 email addresses we need to remove the first one which is the Instance email address. How can we remove that particular email address for all the inbound emails that system will receive ?
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 12:39 AM
Is there any business requirement? if yes then you can use below logic as an example
You can write before insert business rule on sys_email table where you can trim the instance email id from recipients table
var curr = current.recipients;
current.recipients = curr.replace(curr,"instanceemail","");
Thanks & Regards,
Vasanth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 12:37 AM
Hi Sai,
What is the reason for this? The email table should be considered a record/audit of emails received and, in most cases, shouldn't be directly manipulated. Some regulatory requirements also require this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 02:06 AM
Actually, I am taking these multiple email addresses from recipients filed in email table and storing them in a custom field in a custom table. Here in this custom table I do not want the instance email. how can we remove that particular instance email ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 12:39 AM
Is there any business requirement? if yes then you can use below logic as an example
You can write before insert business rule on sys_email table where you can trim the instance email id from recipients table
var curr = current.recipients;
current.recipients = curr.replace(curr,"instanceemail","");
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 02:02 AM
Hello Vasantharajan
Thanks for the reply. I found your answer helpful and i tried it but it is not working. I think replace function is not proper, do we have some other function to use ?