Class NSDocumentTemplateEntity
The template a document is based on is stored in the SO arc\template folder on the server. This will return the name as displayed in the GUI, and not the physical document name, of the template the document object is based on.
Syntax
Constructors
NSDocumentTemplateEntity()
Initializes a new instance of the NSDocumentTemplateEntity class.
Introduced or updated in version: 7.5
Declaration
NSDocumentTemplateEntity
Methods
GetAutoeventId()
Which document plugin is responsible for the documents generated from this template
Introduced or updated in version: 7.5
Declaration
Integer GetAutoeventId()
Returns
Type | Description |
---|---|
Integer |
Examples
NSDocumentTemplateEntity thing;
Integer autoeventId = thing.GetAutoeventId();
GetDefaultOref()
Processed via tag substitution to give document reference
Introduced or updated in version: 7.5
Declaration
String GetDefaultOref()
Returns
Type | Description |
---|---|
String |
Examples
NSDocumentTemplateEntity thing;
String defaultOref = thing.GetDefaultOref();
GetDeleted()
True if deleted
Introduced or updated in version: 7.5
Declaration
Bool GetDeleted()
Returns
Type | Description |
---|---|
Bool |
Examples
NSDocumentTemplateEntity thing;
Bool deleted = thing.GetDeleted();
GetDirection()
Introduced or updated in version: 7.5
Declaration
Integer GetDirection()
Returns
Type | Description |
---|---|
Integer | 1 = incoming, 2 = outgoing. See TaskDirection |
Examples
NSDocumentTemplateEntity thing;
Integer direction = thing.GetDirection();
GetDocumentTemplateId()
Primary key
Introduced or updated in version: 7.5
Declaration
Integer GetDocumentTemplateId()
Returns
Type | Description |
---|---|
Integer |
Examples
NSDocumentTemplateEntity thing;
Integer documentTemplateId = thing.GetDocumentTemplateId();
GetDocumentTypeKey()
The document type to use when creating a blank document. Plugin-specific. Used when not creating template from a local file.
Introduced or updated in version: 7.5
Declaration
Integer GetDocumentTypeKey()
Returns
Type | Description |
---|---|
Integer |
Examples
NSDocumentTemplateEntity thing;
Integer documentTypeKey = thing.GetDocumentTypeKey();
GetEmailSubject()
Subject to use if document template is an email.
Introduced or updated in version: 8.2
Declaration
String GetEmailSubject()
Returns
Type | Description |
---|---|
String |
Examples
NSDocumentTemplateEntity thing;
String emailSubject = thing.GetEmailSubject();
GetFilename()
Relative to TemplatePath, or extref for other document plugins. i.e URL or full path.
Introduced or updated in version: 7.5
Declaration
String GetFilename()
Returns
Type | Description |
---|---|
String |
Examples
NSDocumentTemplateEntity thing;
String filename = thing.GetFilename();
GetIncludeSignature()
True if the email signature should be added in bottom of mail if this an email template
Introduced or updated in version: 8.5R08
Declaration
Bool GetIncludeSignature()
Returns
Type | Description |
---|---|
Bool |
Examples
NSDocumentTemplateEntity thing;
Bool includeSignature = thing.GetIncludeSignature();
GetIntentId()
What is the intention of this document (used by SAINT)
Introduced or updated in version: 7.5
Declaration
Integer GetIntentId()
Returns
Type | Description |
---|---|
Integer |
Examples
NSDocumentTemplateEntity thing;
Integer intentId = thing.GetIntentId();
GetInvitationDocType()
Introduced or updated in version: 7.5
Declaration
Integer GetInvitationDocType()
Returns
Type | Description |
---|---|
Integer | Type for sending email meeting invitation. See DocTmplInvitationType |
Examples
NSDocumentTemplateEntity thing;
Integer invitationDocType = thing.GetInvitationDocType();
GetIsDefaultPublished()
Introduced or updated in version: 7.5
Declaration
Bool GetIsDefaultPublished()
Returns
Type | Description |
---|---|
Bool | Published to external persons. |
Examples
NSDocumentTemplateEntity thing;
Bool isDefaultPublished = thing.GetIsDefaultPublished();
GetIsInUseInGuides()
True if the template is in use in a project or sales guide
Introduced or updated in version: 7.5
Declaration
Bool GetIsInUseInGuides()
Returns
Type | Description |
---|---|
Bool |
Examples
NSDocumentTemplateEntity thing;
Bool isInUseInGuides = thing.GetIsInUseInGuides();
GetLoadTemplateFromPlugin()
Which document plugin is responsible for this template's contents
Introduced or updated in version: 7.5
Declaration
Integer GetLoadTemplateFromPlugin()
Returns
Type | Description |
---|---|
Integer |
Examples
NSDocumentTemplateEntity thing;
Integer loadTemplateFromPlugin = thing.GetLoadTemplateFromPlugin();
GetMimeType()
The mime type
Introduced or updated in version: 7.5
Declaration
String GetMimeType()
Returns
Type | Description |
---|---|
String |
Examples
NSDocumentTemplateEntity thing;
String mimeType = thing.GetMimeType();
GetName()
The template list item
Introduced or updated in version: 7.5
Declaration
String GetName()
Returns
Type | Description |
---|---|
String |
Examples
NSDocumentTemplateEntity thing;
String name = thing.GetName();
GetPrivacyDocType()
Introduced or updated in version: 8.2
Declaration
Integer GetPrivacyDocType()
Returns
Type | Description |
---|---|
Integer | Indicator that this document template has a functional role, related to privacy/GDPR. See DocTmplPrivacyType |
Examples
NSDocumentTemplateEntity thing;
Integer privacyDocType = thing.GetPrivacyDocType();
GetQuoteDocType()
Introduced or updated in version: 7.5
Declaration
Integer GetQuoteDocType()
Returns
Type | Description |
---|---|
Integer | The role this document plays in the Quote system, if any. See DocTmplQuoteType |
Examples
NSDocumentTemplateEntity thing;
Integer quoteDocType = thing.GetQuoteDocType();
GetRank()
Introduced or updated in version: 7.5
Declaration
Integer GetRank()
Returns
Type | Description |
---|---|
Integer | Rank order. |
Examples
NSDocumentTemplateEntity thing;
Integer rank = thing.GetRank();
GetRecordType()
Introduced or updated in version: 7.5
Declaration
NSDocTmplType GetRecordType()
Returns
Type | Description |
---|---|
CRMScript.NetServer.NSDocTmplType | 1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo See TaskType |
Examples
NSDocumentTemplateEntity thing;
NSDocTmplType recordType = thing.GetRecordType();
GetSaveInDb()
1 = save document records in DB; otherwise not.
Introduced or updated in version: 7.5
Declaration
Integer GetSaveInDb()
Returns
Type | Description |
---|---|
Integer |
Examples
NSDocumentTemplateEntity thing;
Integer saveInDb = thing.GetSaveInDb();
GetSenderEmailAddress()
If email template, default sender address when template is of type quote email or privacy email.
Introduced or updated in version: 8.5R08
Declaration
String GetSenderEmailAddress()
Returns
Type | Description |
---|---|
String |
Examples
NSDocumentTemplateEntity thing;
String senderEmailAddress = thing.GetSenderEmailAddress();
GetSenderEmailMode()
Introduced or updated in version: 8.5R08
Declaration
Integer GetSenderEmailMode()
Returns
Type | Description |
---|---|
Integer | If email template, when DocType is Privacy or quote email, it is possible to make sender address like our contact, or our support contact, or always one address. See SenderMailMode |
Examples
NSDocumentTemplateEntity thing;
Integer senderEmailMode = thing.GetSenderEmailMode();
GetShowCurrents()
True if when using this template there should be shown a place for editing current choices of person, compant, sale, project etc
Introduced or updated in version: 8.5R08
Declaration
Bool GetShowCurrents()
Returns
Type | Description |
---|---|
Bool |
Examples
NSDocumentTemplateEntity thing;
Bool showCurrents = thing.GetShowCurrents();
GetTooltip()
Tooltip or other description
Introduced or updated in version: 7.5
Declaration
String GetTooltip()
Returns
Type | Description |
---|---|
String |
Examples
NSDocumentTemplateEntity thing;
String tooltip = thing.GetTooltip();
SetAutoeventId(Integer)
Which document plugin is responsible for the documents generated from this template
Introduced or updated in version: 7.5
Declaration
Void SetAutoeventId(Integer autoeventId)
Parameters
Type | Name | Description |
---|---|---|
Integer | autoeventId |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer autoeventId;
thing.SetAutoeventId(autoeventId);
SetDefaultOref(String)
Processed via tag substitution to give document reference
Introduced or updated in version: 7.5
Declaration
Void SetDefaultOref(String defaultOref)
Parameters
Type | Name | Description |
---|---|---|
String | defaultOref |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
String defaultOref;
thing.SetDefaultOref(defaultOref);
SetDeleted(Bool)
True if deleted
Introduced or updated in version: 7.5
Declaration
Void SetDeleted(Bool deleted)
Parameters
Type | Name | Description |
---|---|---|
Bool | deleted |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Bool deleted;
thing.SetDeleted(deleted);
SetDirection(Integer)
Sets the direction of a document template.
Introduced or updated in version: 7.5
Declaration
Void SetDirection(Integer direction)
Parameters
Type | Name | Description |
---|---|---|
Integer | direction | See TaskDirection. |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer direction;
thing.SetDirection(direction);
SetDocumentTemplateId(Integer)
Primary key
Introduced or updated in version: 7.5
Declaration
Void SetDocumentTemplateId(Integer documentTemplateId)
Parameters
Type | Name | Description |
---|---|---|
Integer | documentTemplateId |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer documentTemplateId;
thing.SetDocumentTemplateId(documentTemplateId);
SetDocumentTypeKey(Integer)
The document type to use when creating a blank document. Plugin-specific. Used when not creating template from a local file.
Introduced or updated in version: 7.5
Declaration
Void SetDocumentTypeKey(Integer documentTypeKey)
Parameters
Type | Name | Description |
---|---|---|
Integer | documentTypeKey |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer documentTypeKey;
thing.SetDocumentTypeKey(documentTypeKey);
SetEmailSubject(String)
Subject to use if document template is an email.
Introduced or updated in version: 8.2
Declaration
Void SetEmailSubject(String emailSubject)
Parameters
Type | Name | Description |
---|---|---|
String | emailSubject |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
String emailSubject;
thing.SetEmailSubject(emailSubject);
SetFilename(String)
Relative to TemplatePath, or extref for other document plugins. i.e URL or full path.
Introduced or updated in version: 7.5
Declaration
Void SetFilename(String filename)
Parameters
Type | Name | Description |
---|---|---|
String | filename |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
String filename;
thing.SetFilename(filename);
SetIncludeSignature(Bool)
True if the email signature should be added in bottom of mail if this an email template
Introduced or updated in version: 8.5R08
Declaration
Void SetIncludeSignature(Bool includeSignature)
Parameters
Type | Name | Description |
---|---|---|
Bool | includeSignature |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Bool includeSignature;
thing.SetIncludeSignature(includeSignature);
SetIntentId(Integer)
What is the intention of this document (used by SAINT)
Introduced or updated in version: 7.5
Declaration
Void SetIntentId(Integer intentId)
Parameters
Type | Name | Description |
---|---|---|
Integer | intentId |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer intentId;
thing.SetIntentId(intentId);
SetInvitationDocType(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetInvitationDocType(Integer invitationDocType)
Parameters
Type | Name | Description |
---|---|---|
Integer | invitationDocType | The role this document plays in the Quote system, if any. See DocTmplQuoteType. |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer invitationDocType;
thing.SetInvitationDocType(invitationDocType);
SetIsDefaultPublished(Bool)
Published to external persons
Introduced or updated in version: 7.5
Declaration
Void SetIsDefaultPublished(Bool isDefaultPublished)
Parameters
Type | Name | Description |
---|---|---|
Bool | isDefaultPublished |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Bool isDefaultPublished;
thing.SetIsDefaultPublished(isDefaultPublished);
SetIsInUseInGuides(Bool)
True if the template is in use in a project or sales guide
Introduced or updated in version: 7.5
Declaration
Void SetIsInUseInGuides(Bool isInUseInGuides)
Parameters
Type | Name | Description |
---|---|---|
Bool | isInUseInGuides |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Bool isInUseInGuides;
thing.SetIsInUseInGuides(isInUseInGuides);
SetLoadTemplateFromPlugin(Integer)
Which document plugin is responsible for this template's contents
Introduced or updated in version: 7.5
Declaration
Void SetLoadTemplateFromPlugin(Integer loadTemplateFromPlugin)
Parameters
Type | Name | Description |
---|---|---|
Integer | loadTemplateFromPlugin |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer loadTemplateFromPlugin;
thing.SetLoadTemplateFromPlugin(loadTemplateFromPlugin);
SetMimeType(String)
The mime type
Introduced or updated in version: 7.5
Declaration
Void SetMimeType(String mimeType)
Parameters
Type | Name | Description |
---|---|---|
String | mimeType |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
String mimeType;
thing.SetMimeType(mimeType);
SetName(String)
The template list item
Introduced or updated in version: 7.5
Declaration
Void SetName(String name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
String name;
thing.SetName(name);
SetPrivacyDocType(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetPrivacyDocType(Integer privacyDocType)
Parameters
Type | Name | Description |
---|---|---|
Integer | privacyDocType | Indicator that this document template has a functional role, related to privacy/GDPR. See DocTmplPrivacyType. |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer privacyDocType;
thing.SetPrivacyDocType(privacyDocType);
SetQuoteDocType(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetQuoteDocType(Integer quoteDocType)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteDocType | The role this document plays in the Quote system, if any. See DocTmplQuoteType. |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer quoteDocType;
thing.SetQuoteDocType(quoteDocType);
SetRank(Integer)
Rank order
Introduced or updated in version: 7.5
Declaration
Void SetRank(Integer rank)
Parameters
Type | Name | Description |
---|---|---|
Integer | rank |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer rank;
thing.SetRank(rank);
SetRecordType(NSDocTmplType)
1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo
Introduced or updated in version: 8.0sr3
Declaration
Void SetRecordType(NSDocTmplType recordType)
Parameters
Type | Name | Description |
---|---|---|
CRMScript.NetServer.NSDocTmplType | recordType |
Returns
Type | Description |
---|---|
Void |
Remarks
See TaskType
Examples
NSDocumentTemplateEntity thing;
NSDocTmplType recordType;
thing.SetRecordType(recordType);
SetSaveInDb(Integer)
1 = save document records in DB; otherwise not.
Introduced or updated in version: 7.5
Declaration
Void SetSaveInDb(Integer saveInDb)
Parameters
Type | Name | Description |
---|---|---|
Integer | saveInDb |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer saveInDb;
thing.SetSaveInDb(saveInDb);
SetSenderEmailAddress(String)
If email template, default senderaddress when template is of type quote email or privacy email.
Introduced or updated in version: 8.5R08
Declaration
Void SetSenderEmailAddress(String senderEmailAddress)
Parameters
Type | Name | Description |
---|---|---|
String | senderEmailAddress |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
String senderEmailAddress;
thing.SetSenderEmailAddress(senderEmailAddress);
SetSenderEmailMode(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetSenderEmailMode(Integer senderEmailMode)
Parameters
Type | Name | Description |
---|---|---|
Integer | senderEmailMode | If email template, when DocType is Privacy or quote email, it is possible to make sender address like our contact, or our support contact, or always one address. See SenderMailMode. |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Integer senderEmailMode;
thing.SetSenderEmailMode(senderEmailMode);
SetShowCurrents(Bool)
True if when using this template there should be shown a place for editing current choices of person, compant, sale, project etc
Introduced or updated in version: 8.5R08
Declaration
Void SetShowCurrents(Bool showCurrents)
Parameters
Type | Name | Description |
---|---|---|
Bool | showCurrents |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
Bool showCurrents;
thing.SetShowCurrents(showCurrents);
SetTooltip(String)
Tooltip or other description
Introduced or updated in version: 7.5
Declaration
Void SetTooltip(String tooltip)
Parameters
Type | Name | Description |
---|---|---|
String | tooltip |
Returns
Type | Description |
---|---|
Void |
Examples
NSDocumentTemplateEntity thing;
String tooltip;
thing.SetTooltip(tooltip);