• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Question for Custom Script

New Here ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

I created an action button to sent a custom email - how do I add a second line to the body of email?

 

Here is the script:

 

var date = new Date();

this.mailDoc({

cTo: "", 

cCc: "SCMAnalytics@nspower.ca",

cSubject: "STOREKEEPER:  Please complete Part #2 of Capital Return Request form (see attached)",

cMsg: "\r\r LAK SUPERVISOR:  Please add Assigned Storekeeper email addy to this email before sending" 

});

TOPICS
How to , PDF forms

Views

811

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 02, 2022 Aug 02, 2022

Use \n to go to new line.

Votes

Translate

Translate
Community Expert ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Use \n to go to new line.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

I don't know where to put it tho...

 

var date = new Date();

this.mailDoc({

cTo: "",

cCc: "SCMAnalytics@nspower.ca",

cSubject: "STOREKEEPER: Please complete Part #2 of Capital Return Request form (see attached)",

cMsg: "\r\r LAK SUPERVISOR: Please add Assigned Storekeeper email addy to this email before sending

/n STOREKEEPER: Please fill-in fields in part #2 of attached form and press button #2 when complete for further processing"

});

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

NVM... lol

Used wrong 'slash'!!  

 

Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

It's \n not /n.

You can use it like this:

"\r\r LAK SUPERVISOR: Please add Assigned Storekeeper email addy to this email before sending\n STOREKEEPER: Please fill-in fields in part #2 of attached form and press button #2 when complete for further processing"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

If the attached form has an "email" field, how do I add that in so it's auto filled?  I tried this but it doesn't work:

 

var date = new Date();

 

this.mailDoc({

 

cTo: = this.getField(“email”).value,

 

cCc: "SCMAnalytics@nspower.ca",

 

cSubject: "STOREKEEPER:  Please complete Part #2 of Capital Return Request form (see attached)",

 

cMsg: "\r\r LAK SUPERVISOR:  Please add Assigned Storekeeper email addy to this email before sending                            

n\ STOREKEEPER:  Please fill-in fields in part #2 of attached form and press button #2 when complete for further processing"

 

});

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Use \n not n\

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Got it - but how about the email field?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Remove the red =

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Just the "=" sign?  Tried this and go error

 

var date = new Date();

 

this.mailDoc({

 

cTo: this.getField(“email”).value,

 

cCc: "SCMAnalytics@nspower.ca",

 

cSubject: "STOREKEEPER: Please complete Part #2 of Capital Return Request form (see attached)",

 

cMsg: "\r\r LAK SUPERVISOR: Please add Assigned Storekeeper email addy to this email before sending

\n STOREKEEPER: Please fill-in fields in part #2 of attached form and press button #2 when complete for further processing"

 

});

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Use " not “

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Sorry - I don't understand - use "not" where?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

I mean the double quotes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Try like this:

cTo: this.getField("email").value,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

LATEST

Yay!!!!  This did it - thanks so much 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines