Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Need help with Javascript automated e-mail

Avatar

Level 2

I am trying to modify a form to add a script so that when it is signed an email is created using fields that will be populated by the user.

currently I have the following script:

var

A = xfa.resolveNode("topmostSubform.Page1.Work_Order__").rawValue;

var

B = xfa.resolveNode("topmostSubform.Page1.NOMENCLATURE").rawValue;

var

PPC = xfa.resolveNode("topmostSubform.Page2.Email_Address_PPC").rawValue;

var

sub = "Work Order Created";

var

msgBody = "The Work Order, " + A + " for the " + B + " program has been created";

event.target.app.mailMsg({

bUI

: true,

cTo

: PPC,

cSubject

: sub,

cMsg

: msgBody,

});

I'm not sure what event I should put the scrip to have the e-mail be created once the document is signed

I'm not sure what event I should put the scrip to have the e-mail be created once the document is signed

Thanks for your help,

John

1 Reply

Avatar

Level 10

Hi John,

Check the sample here, which includes building up the subject and body variables, which user inputted data.

http://assure.ly/m8mN0m

Also, provided you have named objects and subforms, etc, you would not need to use xfa.resolveNode to access the values of objects. See discussion here:

http://forums.adobe.com/message/3666568#3666568

Hope that helps,

Niall