Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Need help in livecycle designer using automated javascript sending emails

Avatar

Avatar
Boost 1
Level 1
brian_s_blanton
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
brian_s_blanton
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
brian_s_blanton
Level 1

12-01-2017

I am trying to modify a form to add a button that takes values from fields that will be populated by the user and then send an email using these fields

currently I have the following script:

var vTo = ""

var vCC= xfa.resolveNode("RequestorEmail").rawValue;

var vSubject = "Purchase Request #: " + xfa.resolveNode("OfficeSymbol1").rawValue + xfa.resolveNode("PurchaseRequest").rawValue + " --> " + xfa.resolveNode("PriorityDesignator").rawValue;

var vBody = "Purchase Request #: " + xfa.resolveNode("OfficeSymbol1").rawValue + xfa.resolveNode("PurchaseRequest").rawValue + " / " + xfa.resolveNode("PriorityDesignator").rawValue + "\nThis PR has been submitted to your manager\n" + xfa.resolveNode("Justification").rawValue + "\n" + xfa.resolveNode("SpecialInstructions").rawValue + "\n" + "The date the requestor is needing the items by " + xfa.resolveNode("DateNeeded").rawValue;

event.target.app.mailDOC({bUI: true, cTo: vTo, cCc: vCC, cSubject: vSubject, cMsg: vBody});

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Boost 1
Level 1
brian_s_blanton
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
brian_s_blanton
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
brian_s_blanton
Level 1

13-01-2017

I have resolved my own question see my code below.

var mail;

var vTo = ""

var vCC = xfa.resolveNode("RequestorEmail").rawValue;

var vSubject = "Purchase Request #: " + xfa.resolveNode("OfficeSymbol1").rawValue + xfa.resolveNode("PurchaseRequest").rawValue + " --> " + xfa.resolveNode("PriorityDesignator").rawValue;

var vBody = "Purchase Request #: " + xfa.resolveNode("OfficeSymbol1").rawValue + xfa.resolveNode("PurchaseRequest").rawValue + " / " + xfa.resolveNode("PriorityDesignator").rawValue + "\nThis PR has been submitted to your manager\n" + xfa.resolveNode("Justification").rawValue + "\n" + xfa.resolveNode("SpecialInstructions").rawValue + "\n" + "The date the requestor is needing the items by " + xfa.resolveNode("DateNeeded").rawValue;

mail = "mailto:" + "?cc=" + vCC + "&subject=" + vSubject + "&body=" + vBody;

event.target.submitForm({cURL: mail, bEmpty: true, cSubmitAs: "PDF", cCharset: "utf-8"});

this code allows me to do what  I need. I thought I would share its format with everyone incase someone else was needing something similar.

Avatar

Avatar
Validate 1
Level 4
Mark_Lindberg
Level 4

Likes

8 likes

Total Posts

211 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 4
Mark_Lindberg
Level 4

Likes

8 likes

Total Posts

211 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
Mark_Lindberg
Level 4

17-01-2017

Brian,

Glad you found a solution.

Thanks for posting it - it really does help others.

Best Regards

Mark