cancel
Showing results for 
Search instead for 
Did you mean: 

retrieving mail field values

jmzags
Champ in-the-making
Champ in-the-making
I have created a workflow using the Designer.  I  added a MailTask (ie servericeTask where type=mail)
I need to be able to pass the final values of the to and from fields of this task to a listener.  I attempted by adding an 'end' execution listener as a Java class, but I'm having difficulty figuring out how to get the values. 
Is this possible?  Could you provide guidance or alternative suggestions?
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Use expressions with variables in mail task to/from fields. Variables are accessible in the listener too.

Regards
Martin

sindhu17
Champ in-the-making
Champ in-the-making
You have to use value attribute to get its value

<input type="text" name="FirstName" value="First Name" />
try -

var text = $('#DynamicValueAssignedHere').find('input[name="FirstName"]').val();

alberthandsome
Champ in-the-making
Champ in-the-making
I created an item type with system name SortedNewsList and one field called Dato (of type Date). This item type is only enabled for paragraphs:
R Programming Online Training  |  SAS Online Training  |  Android Online Training | Weblogic Online TrainingMongoDB Online Training | MongoDB Admin Online Training  |   SQL Online Training

Now, I am using a Razor template for a news list to retrieve the value of the Dato field.

The context of the news list module rendering is a paragraph that is an instance of my paragraph item type just described.

The first lines of my Razor template look like this:

@{
var pageview = Dynamicweb.Frontend.PageView.Current();
var id = pageview.CurrentParagraph.ID;

var item = Dynamicweb.Content.Items.ItemManager.Storage.GetById("SortedNewsList", id.ToString());
var date = item["Dato"];
}

The first two lines are allright. The id variable holds the ID of the current paragraph.

Then I want to use that ID to retrieve the item ( line 3 ) and get the value of the Dato field ( line 4).

But when I try to render @date in the markup, I just get a null reference exception.