Returns:CRMScript.NetServer.NSContact - The contact associated with the document. It may also be null if no contact is associated with the document.Example:
NSDocumentEntity thing;DateTime date = thing.GetDate();
GetDescription()
String GetDescription()
Returns:CRMScript.Global.String - The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases.Example:
Returns:CRMScript.NetServer.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.Example:
NSDocumentEntity thing;NSPerson person = thing.GetPerson();
GetProject()
NSProject GetProject()
Returns:CRMScript.NetServer.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.Example:
Returns:CRMScript.Global.DateTime - Publish to date on NSDocumentEntity. After this date the event is no longer visible.
GetSale()
NSSale GetSale()
Returns:CRMScript.NetServer.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.Example:
NSDocumentEntity thing;NSSale sale = thing.GetSale();
GetSnum()
Integer GetSnum()
Returns:CRMScript.Global.Integer - The sequence number allocated from refcount on used template when creating the document.Example:
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 languagesudefs["custom.progid"] = "foobar";udefs["x_foo"] = "foobar";udefs["x_bar"] = "456"; // List item idthing.SetCustomFields(udefs);
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 languagesextras["custom.progid"] = "foobar";thing.SetExtraFields(extras);
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.
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.
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.
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 languagesudefs["custom.progid"] = "foobar";thing.SetUserDefinedFields(udefs);
SetVisibleFor(NSVisibleFor[])
Sets the user groups and/or users the NSDocumentEntity item is visible for.