Class NSDocumentEntity
Syntax
Constructors
NSDocumentEntity()
Initializes a new instance of the NSDocumentEntity class.
Declaration
Methods
GetActiveLinks()
Declaration
Returns
Type |
Description |
Integer |
Number of active links to sale, document, appointment.
|
Examples
NSDocumentEntity thing;
Integer activeLinks = thing.GetActiveLinks();
GetAssociate()
Declaration
NSAssociate GetAssociate()
Returns
Type |
Description |
NSAssociate |
The owner of the document* the associate whose checklist the document is in.
|
Examples
NSDocumentEntity thing;
NSAssociate associate = thing.GetAssociate();
GetAttention()
Declaration
Returns
Type |
Description |
String |
Attention/salutation.
|
Examples
NSDocumentEntity thing;
String attention = thing.GetAttention();
GetCompleted()
Declaration
Returns
Type |
Description |
Integer |
Document Completed state. This is the part of the Status property.
|
Examples
NSDocumentEntity thing;
Integer completed = thing.GetCompleted();
Declaration
Returns
Type |
Description |
NSContact |
The contact associated with the document. It may also be null if no contact is associated with the document.
|
NSDocumentEntity thing;
NSContact contact = thing.GetContact();
GetCreatedBy()
Declaration
NSAssociate GetCreatedBy()
Returns
Type |
Description |
NSAssociate |
The person that first created the document. The property is read-only.
|
Examples
NSDocumentEntity thing;
NSAssociate createdBy = thing.GetCreatedBy();
GetCreatedDate()
Declaration
DateTime GetCreatedDate()
Returns
Type |
Description |
DateTime |
Registered when.
|
Examples
NSDocumentEntity thing;
DateTime createdDate = thing.GetCreatedDate();
GetCustomFields()
Gets the user-defined + extra fields on an NSDocumentEntity as a map.
Declaration
Returns
Examples
NSDocumentEntity thing;
Map fields = thing.GetCustomFields();
String oldValue = fields.get("SuperOffice:1");
fields.insert("SuperOffice:1", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
printLine(fields.getKey() + ": " + fields.getVal());
GetDate()
Declaration
Returns
Type |
Description |
DateTime |
date + start time planned.
|
Examples
NSDocumentEntity thing;
DateTime date = thing.GetDate();
GetDescription()
Declaration
Returns
Type |
Description |
String |
The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases.
|
Examples
NSDocumentEntity thing;
String description = thing.GetDescription();
GetDocumentId()
Declaration
Returns
Type |
Description |
Integer |
Primary key.
|
Examples
NSDocumentEntity thing;
Integer documentId = thing.GetDocumentId();
GetDocumentTemplate()
Declaration
NSDocumentTemplate GetDocumentTemplate()
Returns
Examples
NSDocumentEntity thing;
NSDocumentTemplate documentTemplate = thing.GetDocumentTemplate();
GetExternalRef()
Declaration
Returns
Type |
Description |
String |
External reference for document plugin to resolve document identity (Notes ID, e-mail message ID, whatever).
|
Examples
NSDocumentEntity thing;
String externalRef = thing.GetExternalRef();
Gets the extra fields on NSDocumentEntity as a map.
Declaration
Returns
NSDocumentEntity thing;
Map fields = thing.GetExtraFields();
String oldValue = fields.get("x_foobar");
fields.insert("x_foobar", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
printLine(fields.getKey() + ": " + fields.getVal());
Declaration
Returns
Type |
Description |
String |
Visible document name.
|
NSDocumentEntity thing;
String header = thing.GetHeader();
GetIsPublished()
Declaration
Returns
Type |
Description |
Bool |
Should this NSDocumentEntity be published and visible to strangers?
|
GetLinks()
Declaration
Returns
Type |
Description |
NSLink[] |
List of all elements linked to the document.
|
Examples
NSDocumentEntity thing;
NSLink[] links = thing.GetLinks();
GetLockSemantics()
Declaration
Integer GetLockSemantics()
Returns
Examples
NSDocumentEntity thing;
Integer lockSemantics = thing.GetLockSemantics();
GetName()
Declaration
Returns
Type |
Description |
String |
File name.
|
Examples
NSDocumentEntity thing;
String name = thing.GetName();
GetOurRef()
Declaration
Returns
Type |
Description |
String |
Our reference, searchable field from free-text search.
|
Examples
NSDocumentEntity thing;
String ourRef = thing.GetOurRef();
GetPerson()
Declaration
Returns
Type |
Description |
NSPerson |
A document may also be connected to a person; this must be a contact person registered on the current company. This does not mean however that a person is required.
|
Examples
NSDocumentEntity thing;
NSPerson person = thing.GetPerson();
GetProject()
Declaration
Returns
Type |
Description |
NSProject |
A document may also be connected to a project, so you see the document both on the company card, and on the project card. This does not mean however that a project is required.
|
Examples
NSDocumentEntity thing;
NSProject project = thing.GetProject();
GetPublishEventDate()
Declaration
DateTime GetPublishEventDate()
Returns
Type |
Description |
DateTime |
Publish event date on NSDocumentEntity.
|
GetPublishFrom()
Declaration
DateTime GetPublishFrom()
Returns
Type |
Description |
DateTime |
Publish from date on NSDocumentEntity.
|
GetPublishTo()
Declaration
Returns
Type |
Description |
DateTime |
Publish to date on NSDocumentEntity. After this date the event is no longer visible.
|
GetSale()
Declaration
Returns
Type |
Description |
NSSale |
A document may also be connected to a sale, so you see the document on the company card, on the project card and on the sale card. This does not mean however that a sale is required. May be null.
|
Examples
NSDocumentEntity thing;
NSSale sale = thing.GetSale();
GetSnum()
Declaration
Returns
Type |
Description |
Integer |
The sequence number allocated from refcount on used template when creating the document.
|
Examples
NSDocumentEntity thing;
Integer snum = thing.GetSnum();
GetSuggestedDocumentId()
Declaration
Integer GetSuggestedDocumentId()
Returns
Type |
Description |
Integer |
Suggested guide item that this document is an instance of.
|
Examples
NSDocumentEntity thing;
Integer suggestedDocumentId = thing.GetSuggestedDocumentId();
GetType()
Declaration
Returns
Type |
Description |
Integer |
Is this a normal document or a mail-merge or report?
|
Examples
NSDocumentEntity thing;
Integer type = thing.GetType();
GetUpdatedBy()
Declaration
NSAssociate GetUpdatedBy()
Returns
Type |
Description |
NSAssociate |
The person that last updated the appointment.
|
Examples
NSDocumentEntity thing;
NSAssociate updatedBy = thing.GetUpdatedBy();
GetUpdatedDate()
Declaration
DateTime GetUpdatedDate()
Returns
Type |
Description |
DateTime |
Last updated when.
|
Examples
NSDocumentEntity thing;
DateTime updatedDate = thing.GetUpdatedDate();
GetUserDefinedFields()
Gets the user-defined fields on the NSDocumentEntity as a map.
Declaration
Map GetUserDefinedFields()
Returns
Examples
NSDocumentEntity thing;
Map fields = thing.GetUserDefinedFields();
String oldValue = fields.get("SuperOffice:1");
fields.insert("SuperOffice:1", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
printLine(fields.getKey() + ": " + fields.getVal());
GetVisibleFor()
Declaration
NSVisibleFor[] GetVisibleFor()
Returns
Type |
Description |
NSVisibleFor[] |
Return the user groups and/or users the NSDocumentEntity item is visible for.
|
Examples
NSDocumentEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();
GetYourRef()
Declaration
Returns
Type |
Description |
String |
Your reference.
|
Examples
NSDocumentEntity thing;
String yourRef = thing.GetYourRef();
SetActiveLinks(Integer)
Declaration
Void SetActiveLinks(Integer activeLinks)
Parameters
Type |
Name |
Description |
Integer |
activeLinks |
Number of active links to sale, document, appointment.
|
Returns
Examples
NSDocumentEntity thing;
Integer activeLinks;
thing.SetActiveLinks(activeLinks);
SetAssociate(NSAssociate)
Declaration
Void SetAssociate(NSAssociate associate)
Parameters
Type |
Name |
Description |
NSAssociate |
associate |
The owner of the document* the associate whose checklist the document is in.
|
Returns
Examples
NSDocumentEntity thing;
NSAssociate associate;
thing.SetAssociate(associate);
SetAttention(String)
Declaration
Void SetAttention(String attention)
Parameters
Type |
Name |
Description |
String |
attention |
Attention/salutation.
|
Returns
Examples
NSDocumentEntity thing;
String attention;
thing.SetAttention(attention);
SetCompleted(Integer)
Declaration
Void SetCompleted(Integer completed)
Parameters
Type |
Name |
Description |
Integer |
completed |
Document Completed state. This is the part of the Status property.
|
Returns
Examples
NSDocumentEntity thing;
Integer completed;
thing.SetCompleted(completed);
Declaration
Void SetContact(NSContact contact)
Parameters
Type |
Name |
Description |
|
contact |
The contact associated with the document. It may also be null if no contact is associated with the document.
|
Returns
NSDocumentEntity thing;
NSContact contact;
thing.SetContact(contact);
SetCreatedBy(NSAssociate)
Declaration
Void SetCreatedBy(NSAssociate createdBy)
Parameters
Type |
Name |
Description |
NSAssociate |
createdBy |
The person that first created the document. The property is read-only.
|
Returns
Examples
NSDocumentEntity thing;
NSAssociate createdBy;
thing.SetCreatedBy(createdBy);
SetCreatedDate(DateTime)
Declaration
Void SetCreatedDate(DateTime createdDate)
Parameters
Type |
Name |
Description |
DateTime |
createdDate |
Registered when.
|
Returns
Examples
NSDocumentEntity thing;
DateTime createdDate;
thing.SetCreatedDate(createdDate);
SetCustomFields(Map)
Sets the user-defined and extra fields on an NSDocumentEntity with a map.
Declaration
Void SetCustomFields(Map udefs)
Parameters
Type |
Name |
Description |
Map |
udefs |
user-defined and extra fields.
|
Returns
Examples
NSDocumentEntity thing;
Map udefs;
udefs["SuperOffice:1"] = "[I:123]";
udefs["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
udefs["custom.progid"] = "foobar";
udefs["x_foo"] = "foobar";
udefs["x_bar"] = "456"; // List item id
thing.SetCustomFields(udefs);
SetDate(DateTime)
Declaration
Void SetDate(DateTime date)
Parameters
Type |
Name |
Description |
DateTime |
date |
date + start time planned.
|
Returns
Examples
NSDocumentEntity thing;
DateTime date;
thing.SetDate(date);
SetDescription(String)
Declaration
Void SetDescription(String description)
Parameters
Type |
Name |
Description |
String |
description |
The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases.
|
Returns
Examples
NSDocumentEntity thing;
String description;
thing.SetDescription(description);
SetDocumentId(Integer)
Declaration
Void SetDocumentId(Integer documentId)
Parameters
Type |
Name |
Description |
Integer |
documentId |
Primary key.
|
Returns
Examples
NSDocumentEntity thing;
Integer documentId;
thing.SetDocumentId(documentId);
SetDocumentTemplate(NSDocumentTemplate)
Declaration
Void SetDocumentTemplate(NSDocumentTemplate documentTemplate)
Parameters
Type |
Name |
Description |
NSDocumentTemplate |
documentTemplate |
The template type of the document.
|
Returns
Examples
NSDocumentEntity thing;
NSDocumentTemplate documentTemplate;
thing.SetDocumentTemplate(documentTemplate);
SetExternalRef(String)
Declaration
Void SetExternalRef(String externalRef)
Parameters
Type |
Name |
Description |
String |
externalRef |
External reference for document plugin to resolve document identity (Notes ID, email message ID, whatever).
|
Returns
Examples
NSDocumentEntity thing;
String externalRef;
thing.SetExternalRef(externalRef);
Sets the extra field values on NSDocumentEntity with a map.
Declaration
Void SetExtraFields(Map extras)
Parameters
Type |
Name |
Description |
Map |
extras |
extra-field values.
|
Returns
NSDocumentEntity thing;
Map extras;
extras["SuperOffice:1"] = "[I:123]";
extras["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
extras["custom.progid"] = "foobar";
thing.SetExtraFields(extras);
Declaration
Void SetHeader(String header)
Parameters
Type |
Name |
Description |
String |
header |
Visible document name.
|
Returns
NSDocumentEntity thing;
String header;
thing.SetHeader(header);
SetIsPublished(Bool)
Sets the IsPublished property
Declaration
Void SetIsPublished(Bool isPublished)
Parameters
Type |
Name |
Description |
Bool |
isPublished |
Should this NSDocumentEntity be published and visible to strangers?
|
Returns
SetLinks(NSLink[])
Declaration
Void SetLinks(NSLink[] links)
Parameters
Type |
Name |
Description |
NSLink[] |
links |
List of all elements linked to the document.
|
Returns
Examples
NSDocumentEntity thing;
NSLink[] links;
thing.SetLinks(links);
SetLockSemantics(Integer)
Declaration
Void SetLockSemantics(Integer lockSemantics)
Parameters
Returns
Examples
NSDocumentEntity thing;
Integer lockSemantics;
thing.SetLockSemantics(lockSemantics);
SetName(String)
Declaration
Void SetName(String name)
Parameters
Type |
Name |
Description |
String |
name |
File name.
|
Returns
Examples
NSDocumentEntity thing;
String name;
thing.SetName(name);
SetOurRef(String)
Declaration
Void SetOurRef(String ourRef)
Parameters
Type |
Name |
Description |
String |
ourRef |
Our reference, searchable field from free-text search.
|
Returns
Examples
NSDocumentEntity thing;
String ourRef;
thing.SetOurRef(ourRef);
SetPerson(NSPerson)
Declaration
Void SetPerson(NSPerson person)
Parameters
Returns
Examples
NSDocumentEntity thing;
NSPerson person;
thing.SetPerson(person);
SetProject(NSProject)
Declaration
Void SetProject(NSProject project)
Parameters
Returns
Examples
NSDocumentEntity thing;
NSProject project;
thing.SetProject(project);
SetPublishEventDate(DateTime)
Declaration
Void SetPublishEventDate(DateTime publishDate)
Parameters
Type |
Name |
Description |
DateTime |
publishDate |
Publish event date on NSDocumentEntity.
|
Returns
SetPublishFrom(DateTime)
Sets the publish from date on an NSDocumentEntity.
Declaration
Void SetPublishFrom(DateTime publishFrom)
Parameters
Type |
Name |
Description |
DateTime |
publishFrom |
|
Returns
SetPublishTo(DateTime)
Sets the publish to date on NSDocumentEntity. After this date the event is no longer visible.
Declaration
Void SetPublishTo(DateTime publishTo)
Parameters
Type |
Name |
Description |
DateTime |
publishTo |
|
Returns
SetSale(NSSale)
Declaration
Void SetSale(NSSale sale)
Parameters
Type |
Name |
Description |
NSSale |
sale |
|
Returns
Examples
NSDocumentEntity thing;
NSSale sale;
thing.SetSale(sale);
SetSnum(Integer)
Declaration
Void SetSnum(Integer snum)
Parameters
Type |
Name |
Description |
Integer |
snum |
The sequence number allocated from refcount on used template when creating the document.
|
Returns
Examples
NSDocumentEntity thing;
Integer snum;
thing.SetSnum(snum);
SetSuggestedDocumentId(Integer)
Declaration
Void SetSuggestedDocumentId(Integer suggestedDocumentId)
Parameters
Type |
Name |
Description |
Integer |
suggestedDocumentId |
Suggested guide item that this document is an instance of.
|
Returns
Examples
NSDocumentEntity thing;
Integer suggestedDocumentId;
thing.SetSuggestedDocumentId(suggestedDocumentId);
SetType(Integer)
Declaration
Void SetType(Integer type)
Parameters
Returns
Examples
NSDocumentEntity thing;
Integer type;
thing.SetType(type);
SetUpdatedBy(NSAssociate)
Declaration
Void SetUpdatedBy(NSAssociate updatedBy)
Parameters
Type |
Name |
Description |
NSAssociate |
associate |
The person that last updated the appointment.
|
Returns
Examples
NSDocumentEntity thing;
NSAssociate updatedBy;
thing.SetUpdatedBy(updatedBy);
SetUpdatedDate(DateTime)
Declaration
Void SetUpdatedDate(DateTime updatedDate)
Parameters
Type |
Name |
Description |
DateTime |
updatedDate |
Last updated when.
|
Returns
Examples
NSDocumentEntity thing;
DateTime updatedDate;
thing.SetUpdatedDate(updatedDate);
SSetUserDefinedFields(Map)
Sets the user-defined fields on the NSDocumentEntity as a map.
Declaration
Void SetUserDefinedFields(Map udefs)
Parameters
Type |
Name |
Description |
Map |
udefs |
user-defined fields.
|
Examples
NSDocumentEntity thing;
Map udefs;
udefs["SuperOffice:1"] = "[I:123]";
udefs["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
udefs["custom.progid"] = "foobar";
thing.SetUserDefinedFields(udefs);
SetVisibleFor(NSVisibleFor[])
Sets the user groups and/or users the NSDocumentEntity item is visible for.
Declaration
Void SetVisibleFor(NSVisibleFor[] visibleFor)
Parameters
Returns
Examples
NSDocumentEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();
visibleFor[0].SetVisiblity(1); // usergroup
visibleFor[0].SetVisibleId(123); // usergroup id
thing.SetVisibleFor(visibleFor);
SetYourRef(String)
Declaration
Void SetYourRef(String yourRef)
Parameters
Type |
Name |
Description |
String |
yourRef |
Your reference.
|
Returns
Examples
NSDocumentEntity thing;
String yourRef;
thing.SetYourRef(yourRef);