Highlighted
Absent Member.
Absent Member.
604 views

Email from .net script

We are sending email from workbench using .net script.  We would like to include the value from active data sheet in subject like. 

 

Can anyone help us how to do it.  below is the code i tried which is not working. 

 

Dim row As ActiveDataRow

Workbench.LoadActiveData("RPA_Order_Creation") 

mail.Subject = "This is an email Karthick" + row.GetString("O_Order_Number")

 

0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: Email from .net script

any suggestions please???
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Email from .net script

Hi.

The row variable in your code is not assigned any value and will not return any string.

Try something like this to read the cell "O_Order_Number" from the first row of your Active Data file:

Dim data As ActiveData = Workbench.LoadActiveData("RPA_Order_Creation")
Dim row As ActiveDataRow = data.Item(1)
mail.Subject = "This is an email Karthick " + row.GetString("O_Order_Number")
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.