Quote document
•
Version: 10
Some tooltip text!
• 1 minute to read
• 1 minute to read
Locate quote document
NSQuoteAgent qa;
NSQuoteEntity quote = qa.GetQuoteEntity(1);
Integer docId = quote.GetDocumentId();
printLine("The main document is " + docId.toString());
Generate quote document
GenerateQuoteDocuments()
will generate all the documents required to send the quote as an email to the prospect.
NSQuoteAgent qa;
NSQuotePublishDocuments docs = qa.GenerateQuoteDocuments(2,1,true,0,false,"Super proposal");
Integer docId = docs.GetQuoteDocumentId();
NSDocumentAgent docAgent;
NSDocumentEntity doc = docAgent.GetDocumentEntity(docId);
printLine(doc.GetContact().GetName());
Parameters
- ID of the version
- ID of the template for the email body
- should the main quote document be attached to the email? (bool)
- ID of the template for the quote lines (can be 0)
- Should the attachments specified (in the database) be included? (bool)
- Subject line for the email, in the correct language (can contain template variables)
Check when a document was sent
NSQuoteAgent qa;
NSQuoteVersion version = qa.GetQuoteVersion(1);
Integer state = version.GetState();
if (state == 6 || state == 8 || state == 9) {
printLine("Proposal was sent " + GetSentDate().toString());
}