Get Value of Target Field in sys_email table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 08:35 AM
Hi
i am trying to get the value of Target field in sys_email tabe in Business Rule (after insert) but every time i access the DisplayValue its gives me empty. Any idea how can i access the value?
or how can i check if target is not empty access the related record in sys_data_source table?
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 09:47 AM
Thanks, gonna try this now, im already using the advance condition. ill update it now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 12:25 PM
Hi Surendar ,
the problem is as you suspected, delayed updation.... now i have checked sending multiple emails and the behavior is not consistent sometimes
on insert i get the Target field and sometimes on update, i need to send an email notification based on the Target value, i cannot have it set it on
insert and on update.
Is there a way i can determine whether the email has attachment and check its format in a robust way?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 01:46 PM
You could try putting a
gs.sleep(1000); // wait 1 second - 1000 milliseconds
at the beginning of your business rule. It's not a good practice,but it might work in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 02:13 PM
Thanks Chuck for your time gs.sleep seems like a privileged resource in SNOW i tried something like (thanks to community)
function zzsleep(ms) {
var unixtime_ms = new Date().getTime();
while(new Date().getTime() < unixtime_ms + ms) {}
}
but to no avail so went the highway, parsed the email headers and in that X-MS-Has-Attach:yes tells whether the email has attachment or not... so i guess it works for me scenario applies here...
Thanks all for your time and value-able suggestions ...
Best Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 02:16 PM
I'm glad you have a workaround.