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 08:37 AM
Can you post your code here? You will have to use this gr.instance.getDisplayValue(); to get the display value

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 08:38 AM
Hi John,
Are you sure you are using the right field? I just did this from scripts background on an existing record in sys_email and it worked fine.
var e = new GlideRecord('sys_email');
e.get('0abb04cfdb6462002e38711ebf961934');
gs.print(e.instance.getDisplayValue());
*** Script: Approval: CHG0030002
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 08:43 AM
Thanks Chuck for your time i am accessing the value in Business Rule which i have created in sys_email table in that BR i am trying to access the value like
var rx= current.instance.getDisplayValue();
//based on rx i am querying the sys_data_source table but it returns null as rx always is empty

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2016 08:46 AM
Thank you John. I'm not sure I understand what you are doing with sys_data_source in this scenario. Can you paste a screenshot of your business rule?