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

Abhinay Erra
Giga Sage

Can you post your code here? You will have to use this gr.instance.getDisplayValue(); to get the display value


Chuck Tomasi
Tera Patron

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


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


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?