Class NSDocumentEntity
Constructors
NSDocumentEntity()
Initializes a new instance of the NSDocumentEntity class.
Declaration
NSDocumentEntity Methods
GetActiveLinks()
Declaration
Integer GetActiveLinks() Examples
NSDocumentEntity thing;
Integer activeLinks = thing.GetActiveLinks();
Returns
| Type | Description |
| Integer | Number of active links to sale, document, appointment. |
GetAssociate()
Declaration
NSAssociate GetAssociate() Examples
NSDocumentEntity thing;
NSAssociate associate = thing.GetAssociate();
Returns
| Type | Description |
| NSAssociate | The owner of the document* the associate whose checklist the document is in. |
GetAttention()
Declaration
String GetAttention() Examples
NSDocumentEntity thing;
String attention = thing.GetAttention();
Returns
| Type | Description |
| String | Attention/salutation. |
GetCompleted()
Declaration
Integer GetCompleted() Examples
NSDocumentEntity thing;
Integer completed = thing.GetCompleted();
Returns
| Type | Description |
| Integer | Document Completed state. This is the part of the Status property. |
GetContact()
Declaration
NSContact GetContact() Examples
NSDocumentEntity thing;
NSContact contact = thing.GetContact();
Returns
| Type | Description |
| NSContact | The contact associated with the document. It may also be null if no contact is associated with the document. |
GetCreatedBy()
Declaration
NSAssociate GetCreatedBy() Examples
NSDocumentEntity thing;
NSAssociate createdBy = thing.GetCreatedBy();
Returns
| Type | Description |
| NSAssociate | The person that first created the document. The property is read-only. |
GetCreatedDate()
Declaration
DateTime GetCreatedDate() Examples
NSDocumentEntity thing;
DateTime createdDate = thing.GetCreatedDate();
Returns
| Type | Description |
| DateTime | Registered when. |
GetCustomFields()
Gets the user-defined + extra fields on an NSDocumentEntity as a map.
Declaration
Map GetCustomFields() 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());
Returns
| Type | Description |
| Map |
GetDate()
Declaration
DateTime GetDate() Examples
NSDocumentEntity thing;
DateTime date = thing.GetDate();
Returns
| Type | Description |
| DateTime | date + start time planned. |
GetDescription()
Declaration
String GetDescription() Examples
NSDocumentEntity thing;
String description = thing.GetDescription();
Returns
| Type | Description |
| String | The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases. |
GetDocumentId()
Declaration
Integer GetDocumentId() Examples
NSDocumentEntity thing;
Integer documentId = thing.GetDocumentId();
Returns
| Type | Description |
| Integer | Primary key. |
GetDocumentTemplate()
Declaration
NSDocumentTemplate GetDocumentTemplate() Examples
NSDocumentEntity thing;
NSDocumentTemplate documentTemplate = thing.GetDocumentTemplate();
Returns
| Type | Description |
| NSDocumentTemplate | The template type of the document. |
GetExternalRef()
Declaration
String GetExternalRef() Examples
NSDocumentEntity thing;
String externalRef = thing.GetExternalRef();
Returns
| Type | Description |
| String | External reference for document plugin to resolve document identity (Notes ID, e-mail message ID, whatever). |
GetExtraFields()
Gets the extra fields on NSDocumentEntity as a map.
Declaration
Map GetExtraFields() Examples
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());
Returns
| Type | Description |
| Map |
GetHeader()
Declaration
String GetHeader() Examples
NSDocumentEntity thing;
String header = thing.GetHeader();
Returns
| Type | Description |
| String | Visible document name. |
GetIsPublished()
Declaration
Bool GetIsPublished() Returns
| Type | Description |
| Bool | Should this NSDocumentEntity be published and visible to strangers? |
GetLinks()
Declaration
NSLink[] GetLinks() Examples
NSDocumentEntity thing;
NSLink[] links = thing.GetLinks();
Returns
| Type | Description |
| NSLink[] | List of all elements linked to the document. |
GetLockSemantics()
Declaration
Integer GetLockSemantics() Examples
NSDocumentEntity thing;
Integer lockSemantics = thing.GetLockSemantics();
Returns
| Type | Description |
| Integer | See <xref href="CRMScript.NetServer.DocumentLockSemantics" data-throw-if-not-resolved="false"></xref> |
GetName()
Declaration
String GetName() Examples
NSDocumentEntity thing;
String name = thing.GetName();
Returns
| Type | Description |
| String | File name. |
GetOurRef()
Declaration
String GetOurRef() Examples
NSDocumentEntity thing;
String ourRef = thing.GetOurRef();
Returns
| Type | Description |
| String | Our reference, searchable field from free-text search. |
GetPerson()
Declaration
NSPerson GetPerson() Examples
NSDocumentEntity thing;
NSPerson person = thing.GetPerson();
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. |
GetProject()
Declaration
NSProject GetProject() Examples
NSDocumentEntity thing;
NSProject project = thing.GetProject();
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. |
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
DateTime GetPublishTo() Returns
| Type | Description |
| DateTime | Publish to date on NSDocumentEntity. After this date the event is no longer visible. |
GetSale()
Declaration
NSSale GetSale() Examples
NSDocumentEntity thing;
NSSale sale = thing.GetSale();
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. |
GetSnum()
Declaration
Integer GetSnum() Examples
NSDocumentEntity thing;
Integer snum = thing.GetSnum();
Returns
| Type | Description |
| Integer | The sequence number allocated from refcount on used template when creating the document. |
GetSuggestedDocumentId()
Declaration
Integer GetSuggestedDocumentId() Examples
NSDocumentEntity thing;
Integer suggestedDocumentId = thing.GetSuggestedDocumentId();
Returns
| Type | Description |
| Integer | Suggested guide item that this document is an instance of. |
GetType()
Declaration
Integer GetType() Examples
NSDocumentEntity thing;
Integer type = thing.GetType();
Returns
| Type | Description |
| Integer | Is this a normal document or a mail-merge or report? |
GetUpdatedBy()
Declaration
NSAssociate GetUpdatedBy() Examples
NSDocumentEntity thing;
NSAssociate updatedBy = thing.GetUpdatedBy();
Returns
| Type | Description |
| NSAssociate | The person that last updated the appointment. |
GetUpdatedDate()
Declaration
DateTime GetUpdatedDate() Examples
NSDocumentEntity thing;
DateTime updatedDate = thing.GetUpdatedDate();
Returns
| Type | Description |
| DateTime | Last updated when. |
GetUserDefinedFields()
Gets the user-defined fields on the NSDocumentEntity as a map.
Declaration
Map GetUserDefinedFields() 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());
Returns
| Type | Description |
| Map |
GetVisibleFor()
Declaration
NSVisibleFor[] GetVisibleFor() Examples
NSDocumentEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();
Returns
| Type | Description |
| NSVisibleFor[] | Return the user groups and/or users the NSDocumentEntity item is visible for. |
GetYourRef()
Declaration
String GetYourRef() Examples
NSDocumentEntity thing;
String yourRef = thing.GetYourRef();
Returns
| Type | Description |
| String | Your reference. |
SetActiveLinks(Integer)
Declaration
Void SetActiveLinks(Integer activeLinks) Examples
NSDocumentEntity thing;
Integer activeLinks;
thing.SetActiveLinks(activeLinks);
Parameters
| Type | Name | Description |
| Integer | activeLinks | Number of active links to sale, document, appointment. |
Returns
| Type | Description |
| Void |
SetAssociate(NSAssociate)
Declaration
Void SetAssociate(NSAssociate associate) Examples
NSDocumentEntity thing;
NSAssociate associate;
thing.SetAssociate(associate);
Parameters
| Type | Name | Description |
| NSAssociate | associate | The owner of the document* the associate whose checklist the document is in. |
Returns
| Type | Description |
| Void |
SetAttention(String)
Declaration
Void SetAttention(String attention) Examples
NSDocumentEntity thing;
String attention;
thing.SetAttention(attention);
Parameters
| Type | Name | Description |
| String | attention | Attention/salutation. |
Returns
| Type | Description |
| Void |
SetCompleted(Integer)
Declaration
Void SetCompleted(Integer completed) Examples
NSDocumentEntity thing;
Integer completed;
thing.SetCompleted(completed);
Parameters
| Type | Name | Description |
| Integer | completed | Document Completed state. This is the part of the Status property. |
Returns
| Type | Description |
| Void |
SetContact(NSContact)
Declaration
Void SetContact(NSContact contact) Examples
NSDocumentEntity thing;
NSContact contact;
thing.SetContact(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
| Type | Description |
| Void |
SetCreatedBy(NSAssociate)
Declaration
Void SetCreatedBy(NSAssociate createdBy) Examples
NSDocumentEntity thing;
NSAssociate createdBy;
thing.SetCreatedBy(createdBy);
Parameters
| Type | Name | Description |
| NSAssociate | createdBy | The person that first created the document. The property is read-only. |
Returns
| Type | Description |
| Void |
SetCreatedDate(DateTime)
Declaration
Void SetCreatedDate(DateTime createdDate) Examples
NSDocumentEntity thing;
DateTime createdDate;
thing.SetCreatedDate(createdDate);
Parameters
| Type | Name | Description |
| DateTime | createdDate | Registered when. |
Returns
| Type | Description |
| Void |
SetCustomFields(Map)
Sets the user-defined and extra fields on an NSDocumentEntity with a map.
Declaration
Void SetCustomFields(Map udefs) 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);
Parameters
| Type | Name | Description |
| Map | udefs | user-defined and extra fields. |
Returns
| Type | Description |
| Void |
SetDate(DateTime)
Declaration
Void SetDate(DateTime date) Examples
NSDocumentEntity thing;
DateTime date;
thing.SetDate(date);
Parameters
| Type | Name | Description |
| DateTime | date | date + start time planned. |
Returns
| Type | Description |
| Void |
SetDescription(String)
Declaration
Void SetDescription(String description) Examples
NSDocumentEntity thing;
String description;
thing.SetDescription(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
| Type | Description |
| Void |
SetDocumentId(Integer)
Declaration
Void SetDocumentId(Integer documentId) Examples
NSDocumentEntity thing;
Integer documentId;
thing.SetDocumentId(documentId);
Parameters
| Type | Name | Description |
| Integer | documentId | Primary key. |
Returns
| Type | Description |
| Void |
SetDocumentTemplate(NSDocumentTemplate)
Declaration
Void SetDocumentTemplate(NSDocumentTemplate documentTemplate) Examples
NSDocumentEntity thing;
NSDocumentTemplate documentTemplate;
thing.SetDocumentTemplate(documentTemplate);
Parameters
| Type | Name | Description |
| NSDocumentTemplate | documentTemplate | The template type of the document. |
Returns
| Type | Description |
| Void |
SetExternalRef(String)
Declaration
Void SetExternalRef(String externalRef) Examples
NSDocumentEntity thing;
String externalRef;
thing.SetExternalRef(externalRef);
Parameters
| Type | Name | Description |
| String | externalRef | External reference for document plugin to resolve document identity (Notes ID, email message ID, whatever). |
Returns
| Type | Description |
| Void |
SetExtraFields(Map)
Sets the extra field values on NSDocumentEntity with a map.
Declaration
Void SetExtraFields(Map extras) Examples
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);
Parameters
| Type | Name | Description |
| Map | extras | extra-field values. |
Returns
| Type | Description |
| Void |
SetHeader(String)
Declaration
Void SetHeader(String header) Examples
NSDocumentEntity thing;
String header;
thing.SetHeader(header);
Parameters
| Type | Name | Description |
| String | header | Visible document name. |
Returns
| Type | Description |
| Void |
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
| Type | Description |
| Void |
SetLinks(NSLink[])
Declaration
Void SetLinks(NSLink[] links) Examples
NSDocumentEntity thing;
NSLink[] links;
thing.SetLinks(links);
Parameters
| Type | Name | Description |
| NSLink[] | links | List of all elements linked to the document. |
Returns
| Type | Description |
| Void |
SetLockSemantics(Integer)
Declaration
Void SetLockSemantics(Integer lockSemantics) Examples
NSDocumentEntity thing;
Integer lockSemantics;
thing.SetLockSemantics(lockSemantics);
Parameters
| Type | Name | Description |
| Integer | lockSemantics | See <xref href="CRMScript.NetServer.DocumentLockSemantics" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
SetName(String)
Declaration
Void SetName(String name) Examples
NSDocumentEntity thing;
String name;
thing.SetName(name);
Parameters
| Type | Name | Description |
| String | name | File name. |
Returns
| Type | Description |
| Void |
SetOurRef(String)
Declaration
Void SetOurRef(String ourRef) Examples
NSDocumentEntity thing;
String ourRef;
thing.SetOurRef(ourRef);
Parameters
| Type | Name | Description |
| String | ourRef | Our reference, searchable field from free-text search. |
Returns
| Type | Description |
| Void |
SetPerson(NSPerson)
Declaration
Void SetPerson(NSPerson person) Examples
NSDocumentEntity thing;
NSPerson person;
thing.SetPerson(person);
Parameters
| Type | Name | Description |
| NSPerson | person |
Returns
| Type | Description |
| Void |
SetProject(NSProject)
Declaration
Void SetProject(NSProject project) Examples
NSDocumentEntity thing;
NSProject project;
thing.SetProject(project);
Parameters
| Type | Name | Description |
| NSProject | project |
Returns
| Type | Description |
| Void |
SetPublishEventDate(DateTime)
Declaration
Void SetPublishEventDate(DateTime publishDate) Parameters
| Type | Name | Description |
| DateTime | publishDate | Publish event date on NSDocumentEntity. |
Returns
| Type | Description |
| Void |
SetPublishFrom(DateTime)
Sets the publish from date on an NSDocumentEntity.
Declaration
Void SetPublishFrom(DateTime publishFrom) Parameters
| Type | Name | Description |
| DateTime | publishFrom |
Returns
| Type | Description |
| Void |
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
| Type | Description |
| Void |
SetSale(NSSale)
Declaration
Void SetSale(NSSale sale) Examples
NSDocumentEntity thing;
NSSale sale;
thing.SetSale(sale);
Parameters
| Type | Name | Description |
| NSSale | sale |
Returns
| Type | Description |
| Void |
SetSnum(Integer)
Declaration
Void SetSnum(Integer snum) Examples
NSDocumentEntity thing;
Integer snum;
thing.SetSnum(snum);
Parameters
| Type | Name | Description |
| Integer | snum | The sequence number allocated from refcount on used template when creating the document. |
Returns
| Type | Description |
| Void |
SetSuggestedDocumentId(Integer)
Declaration
Void SetSuggestedDocumentId(Integer suggestedDocumentId) Examples
NSDocumentEntity thing;
Integer suggestedDocumentId;
thing.SetSuggestedDocumentId(suggestedDocumentId);
Parameters
| Type | Name | Description |
| Integer | suggestedDocumentId | Suggested guide item that this document is an instance of. |
Returns
| Type | Description |
| Void |
SetType(Integer)
Declaration
Void SetType(Integer type) Examples
NSDocumentEntity thing;
Integer type;
thing.SetType(type);
Parameters
| Type | Name | Description |
| Integer | type | Is this a normal document or a mail-merge or report? See <xref href="CRMScript.NetServer.AppointmentType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
SetUpdatedBy(NSAssociate)
Declaration
Void SetUpdatedBy(NSAssociate updatedBy) Examples
NSDocumentEntity thing;
NSAssociate updatedBy;
thing.SetUpdatedBy(updatedBy);
Parameters
| Type | Name | Description |
| NSAssociate | associate | The person that last updated the appointment. |
Returns
| Type | Description |
| Void |
SetUpdatedDate(DateTime)
Declaration
Void SetUpdatedDate(DateTime updatedDate) Examples
NSDocumentEntity thing;
DateTime updatedDate;
thing.SetUpdatedDate(updatedDate);
Parameters
| Type | Name | Description |
| DateTime | updatedDate | Last updated when. |
Returns
| Type | Description |
| Void |
SetUserDefinedFields(Map)
Sets the user-defined fields on the NSDocumentEntity as a map.
Declaration
Void SetUserDefinedFields(Map udefs) 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);
Parameters
| Type | Name | Description |
| Map | udefs | user-defined fields. |
Returns
| Type | Description |
| Void |
SetVisibleFor(NSVisibleFor[])
Sets the user groups and/or users the NSDocumentEntity item is visible for.
Declaration
Void SetVisibleFor(NSVisibleFor[] visibleFor) Examples
NSDocumentEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();
visibleFor[0].SetVisiblity(1); // usergroup
visibleFor[0].SetVisibleId(123); // usergroup id
thing.SetVisibleFor(visibleFor);
Parameters
| Type | Name | Description |
| NSVisibleFor[] | visibleFor |
Returns
| Type | Description |
| Void |