Show / Hide Table of Contents

Class NSDocumentTemplate

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

NSDocumentTemplate()

Initializes a new instance of the NSDocumentTemplate class.

Introduced or updated in version: 7

Declaration
NSDocumentTemplate

Methods

GetAutoeventId()

Introduced or updated in version: 7

Declaration
Integer GetAutoeventId()
Returns
Type Description
Integer

Which document plugin is responsible for the documents generated from this template.

Examples
NSDocumentTemplate thing;
Integer autoeventId = thing.GetAutoeventId();

GetDefaultOref()

Introduced or updated in version: 7

Declaration
String GetDefaultOref()
Returns
Type Description
String

Processed via tag substitution to give document reference.

Examples
NSDocumentTemplate thing;
String defaultOref = thing.GetDefaultOref();

GetDeleted()

Introduced or updated in version: 7

Declaration
Integer GetDeleted()
Returns
Type Description
Integer

0 -> record is active 1 -> record is 'deleted' and should not be shown in lists.

Examples
NSDocumentTemplate thing;
Integer deleted = thing.GetDeleted();

GetDirection()

Introduced or updated in version: 7

Declaration
Integer GetDirection()
Returns
Type Description
Integer

1 = incoming, 2 = outgoing. See TaskDirection

Examples
NSDocumentTemplate thing;
Integer direction = thing.GetDirection();

GetDocumentTemplateId()

Introduced or updated in version: 7

Declaration
Integer GetDocumentTemplateId()
Returns
Type Description
Integer

Primary key.

Examples
NSDocumentTemplate thing;
Integer documentTemplateId = thing.GetDocumentTemplateId();

GetFilename()

Introduced or updated in version: 7

Declaration
String GetFilename()
Returns
Type Description
String

Relative to TemplatePath.

Examples
NSDocumentTemplate thing;
String filename = thing.GetFilename();

GetName()

Introduced or updated in version: 7

Declaration
String GetName()
Returns
Type Description
String

The list item.

Examples
NSDocumentTemplate thing;
String name = thing.GetName();

GetQuoteDocType()

Introduced or updated in version: 7.5

Declaration
Integer GetQuoteDocType()
Returns
Type Description
Integer

What type of quote document is this? See DocTmplQuoteType

Examples
NSDocumentTemplate thing;
NSDocTmplQuoteType quoteDocType = thing.GetQuoteDocType();

GetRecordType()

Introduced or updated in version: 7

Declaration
NSDocTmplType GetRecordType()
Returns
Type Description
CRMScript.NetServer.NSDocTmplType

1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo See TaskType

Examples
NSDocumentTemplate thing;
NSDocTmplType recordType = thing.GetRecordType();

GetSaveInDb()

Introduced or updated in version: 7

Declaration
Integer GetSaveInDb()
Returns
Type Description
Integer

1 = save document records in DB; otherwise not.

Examples
NSDocumentTemplate thing;
Integer saveInDb = thing.GetSaveInDb();

GetTooltip()

Introduced or updated in version: 7

Declaration
String GetTooltip()
Returns
Type Description
String

Tooltip or other description.

Examples
NSDocumentTemplate thing;
String tooltip = thing.GetTooltip();

SetAutoeventId(Integer)

Introduced or updated in version: 7

Declaration
Void SetAutoeventId(Integer autoeventId)
Parameters
Type Name Description
Integer autoeventId

Which document plugin is responsible for the documents generated from this template.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
Integer autoeventId;
thing.SetAutoeventId(autoeventId);

SetDefaultOref(String)

Introduced or updated in version: 7

Declaration
Void SetDefaultOref(String defaultOref)
Parameters
Type Name Description
String defaultOref

Processed via tag substitution to give document reference.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
String defaultOref;
thing.SetDefaultOref(defaultOref);

SetDeleted(Integer)

Introduced or updated in version: 7

Declaration
Void SetDeleted(Integer deleted)
Parameters
Type Name Description
Integer deleted

0 -> record is active 1 -> record is 'deleted' and should not be shown in lists.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
Integer deleted;
thing.SetDeleted(deleted);

SetDirection(Integer)

Sets the direction of a document template

Introduced or updated in version: 7

Declaration
Void SetDirection(Integer direction)
Parameters
Type Name Description
Integer direction

The direction of documents from this template. See TaskDirection.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
Integer direction;
thing.SetDirection(direction);

SetDocumentTemplateId(Integer)

Introduced or updated in version: 7

Declaration
Void SetDocumentTemplateId(Integer documentTemplateId)
Parameters
Type Name Description
Integer documentTemplateId

Primary key.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
Integer documentTemplateId;
thing.SetDocumentTemplateId(documentTemplateId);

SetFilename(String)

Introduced or updated in version: 7

Declaration
Void SetFilename(String filename)
Parameters
Type Name Description
String filename

Relative to TemplatePath.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
String filename;
thing.SetFilename(filename);

SetName(String)

Introduced or updated in version: 7

Declaration
Void SetName(String name)
Parameters
Type Name Description
String name

The list item.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
String name;
thing.SetName(name);

SetQuoteDocType(Integer)

Introduced or updated in version: 7.5

Declaration
Void SetQuoteDocType(Integer quoteDocType)
Parameters
Type Name Description
Integer quoteDocType

What type of quote document is this? See DocTmplQuoteType.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
Integer quoteDocType;
thing.SetQuoteDocType(quoteDocType);

SetRecordType(NSDocTmplType)

Introduced or updated in version: 8.0sr3

Declaration
Void SetRecordType(NSDocTmplType recordType)
Parameters
Type Name Description
CRMScript.NetServer.NSDocTmplType recordType

1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo See TaskType.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
NSDocTmplType recordType;
thing.SetRecordType(recordType);

SetSaveInDb(Integer)

Introduced or updated in version: 7

Declaration
Void SetSaveInDb(Integer saveInDb)
Parameters
Type Name Description
Integer saveInDb

1 = save document records in DB; otherwise not.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
Integer saveInDb;
thing.SetSaveInDb(saveInDb);

SetTooltip(String)

Introduced or updated in version: 7

Declaration
Void SetTooltip(String tooltip)
Parameters
Type Name Description
String tooltip

Tooltip or other description.

Returns
Type Description
Void
Examples
NSDocumentTemplate thing;
String tooltip;
thing.SetTooltip(tooltip);
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top