Changing the email body for transactions sent as a PDF attachment
When a Sales Order is emailed to a customer with Email Preference set to PDF, the body of the email reads:
Please open the attached file to view your Sales Order.
To view the attachment, you first need the free Adobe Acrobat Reader. If you don't have it yet, visit Adobe's Web site http://www.adobe.com/products/acrobat/readstep.html to download it.[/CODE]
I'd like to add onto this message a bit. I think that will require me to write a script that renders the transaction to a PDF template and sends the email with whatever message I choose. It also needs to prevent NetSuite from sending the default email as well.
Would the following work:
In a beforeSubmit function on Sales Order records, if the customer has Email Preference=PDF, uncheck the 'Email To' field. Set a new custom checkbox such as 'Email PDF' to true instead.
In a User Event Script, after a Sales Order submits and has 'Email PDF' set to true, render the transaction to a PDF and send it in an email to all the 'Email To' recipients.
Or is there a better solution I may be overlooking?
The 'duplicate question' says this can't be done yet I have a working solution. It also references SuiteTalk, not the same.
netsuite suitescript2.0
add a comment |
When a Sales Order is emailed to a customer with Email Preference set to PDF, the body of the email reads:
Please open the attached file to view your Sales Order.
To view the attachment, you first need the free Adobe Acrobat Reader. If you don't have it yet, visit Adobe's Web site http://www.adobe.com/products/acrobat/readstep.html to download it.[/CODE]
I'd like to add onto this message a bit. I think that will require me to write a script that renders the transaction to a PDF template and sends the email with whatever message I choose. It also needs to prevent NetSuite from sending the default email as well.
Would the following work:
In a beforeSubmit function on Sales Order records, if the customer has Email Preference=PDF, uncheck the 'Email To' field. Set a new custom checkbox such as 'Email PDF' to true instead.
In a User Event Script, after a Sales Order submits and has 'Email PDF' set to true, render the transaction to a PDF and send it in an email to all the 'Email To' recipients.
Or is there a better solution I may be overlooking?
The 'duplicate question' says this can't be done yet I have a working solution. It also references SuiteTalk, not the same.
netsuite suitescript2.0
Possible duplicate of Netsuite suitetalk transaction email with pdf attachment intro text
– Jdg50
Jan 3 at 12:48
There's no answer there so that doesn't really help.
– Badger
Jan 3 at 23:09
add a comment |
When a Sales Order is emailed to a customer with Email Preference set to PDF, the body of the email reads:
Please open the attached file to view your Sales Order.
To view the attachment, you first need the free Adobe Acrobat Reader. If you don't have it yet, visit Adobe's Web site http://www.adobe.com/products/acrobat/readstep.html to download it.[/CODE]
I'd like to add onto this message a bit. I think that will require me to write a script that renders the transaction to a PDF template and sends the email with whatever message I choose. It also needs to prevent NetSuite from sending the default email as well.
Would the following work:
In a beforeSubmit function on Sales Order records, if the customer has Email Preference=PDF, uncheck the 'Email To' field. Set a new custom checkbox such as 'Email PDF' to true instead.
In a User Event Script, after a Sales Order submits and has 'Email PDF' set to true, render the transaction to a PDF and send it in an email to all the 'Email To' recipients.
Or is there a better solution I may be overlooking?
The 'duplicate question' says this can't be done yet I have a working solution. It also references SuiteTalk, not the same.
netsuite suitescript2.0
When a Sales Order is emailed to a customer with Email Preference set to PDF, the body of the email reads:
Please open the attached file to view your Sales Order.
To view the attachment, you first need the free Adobe Acrobat Reader. If you don't have it yet, visit Adobe's Web site http://www.adobe.com/products/acrobat/readstep.html to download it.[/CODE]
I'd like to add onto this message a bit. I think that will require me to write a script that renders the transaction to a PDF template and sends the email with whatever message I choose. It also needs to prevent NetSuite from sending the default email as well.
Would the following work:
In a beforeSubmit function on Sales Order records, if the customer has Email Preference=PDF, uncheck the 'Email To' field. Set a new custom checkbox such as 'Email PDF' to true instead.
In a User Event Script, after a Sales Order submits and has 'Email PDF' set to true, render the transaction to a PDF and send it in an email to all the 'Email To' recipients.
Or is there a better solution I may be overlooking?
The 'duplicate question' says this can't be done yet I have a working solution. It also references SuiteTalk, not the same.
netsuite suitescript2.0
netsuite suitescript2.0
edited Jan 4 at 4:23
Badger
asked Jan 2 at 23:29
BadgerBadger
959
959
Possible duplicate of Netsuite suitetalk transaction email with pdf attachment intro text
– Jdg50
Jan 3 at 12:48
There's no answer there so that doesn't really help.
– Badger
Jan 3 at 23:09
add a comment |
Possible duplicate of Netsuite suitetalk transaction email with pdf attachment intro text
– Jdg50
Jan 3 at 12:48
There's no answer there so that doesn't really help.
– Badger
Jan 3 at 23:09
Possible duplicate of Netsuite suitetalk transaction email with pdf attachment intro text
– Jdg50
Jan 3 at 12:48
Possible duplicate of Netsuite suitetalk transaction email with pdf attachment intro text
– Jdg50
Jan 3 at 12:48
There's no answer there so that doesn't really help.
– Badger
Jan 3 at 23:09
There's no answer there so that doesn't really help.
– Badger
Jan 3 at 23:09
add a comment |
1 Answer
1
active
oldest
votes
This is a solution someone gave me on the official NetSuite forum:
You can accomplish this fairly easily with a Workflow.
- Trigger on Before Record Submit when 'To Be E-mailed' = T
- Set Field Value of 'To Be E-mailed' = F
- Transition to next state After Record Submit
- Use 'Send Email' action. This allows you to use an email template and
also automatically attach pdf
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54014541%2fchanging-the-email-body-for-transactions-sent-as-a-pdf-attachment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is a solution someone gave me on the official NetSuite forum:
You can accomplish this fairly easily with a Workflow.
- Trigger on Before Record Submit when 'To Be E-mailed' = T
- Set Field Value of 'To Be E-mailed' = F
- Transition to next state After Record Submit
- Use 'Send Email' action. This allows you to use an email template and
also automatically attach pdf
add a comment |
This is a solution someone gave me on the official NetSuite forum:
You can accomplish this fairly easily with a Workflow.
- Trigger on Before Record Submit when 'To Be E-mailed' = T
- Set Field Value of 'To Be E-mailed' = F
- Transition to next state After Record Submit
- Use 'Send Email' action. This allows you to use an email template and
also automatically attach pdf
add a comment |
This is a solution someone gave me on the official NetSuite forum:
You can accomplish this fairly easily with a Workflow.
- Trigger on Before Record Submit when 'To Be E-mailed' = T
- Set Field Value of 'To Be E-mailed' = F
- Transition to next state After Record Submit
- Use 'Send Email' action. This allows you to use an email template and
also automatically attach pdf
This is a solution someone gave me on the official NetSuite forum:
You can accomplish this fairly easily with a Workflow.
- Trigger on Before Record Submit when 'To Be E-mailed' = T
- Set Field Value of 'To Be E-mailed' = F
- Transition to next state After Record Submit
- Use 'Send Email' action. This allows you to use an email template and
also automatically attach pdf
answered Jan 3 at 23:21
BadgerBadger
959
959
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54014541%2fchanging-the-email-body-for-transactions-sent-as-a-pdf-attachment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Possible duplicate of Netsuite suitetalk transaction email with pdf attachment intro text
– Jdg50
Jan 3 at 12:48
There's no answer there so that doesn't really help.
– Badger
Jan 3 at 23:09