Get Value of Target Field in sys_email table

thisisauniqueus
Giga Expert

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.

24 REPLIES 24

Thanks, gonna try this now, im already using the advance condition. ill update it now


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,



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.


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.


I'm glad you have a workaround.