API documentation

Note Class Reference

Description

Renders a note.

Protected Member Functions

 _render ($note)
 Renders a note. More...
 
 _renderStub ($note)
 Renders a note stub. More...
 

Member Function Documentation

_render (   $note)
protected

Renders a note.

Notes appear in the "notes" array for Accounts, Contacts, and Leads, and a single note may appear in the "logNote" key for an Activity. The entity that this note belongs to will be available under the "lead", "account", or "contact" key as a stub.

A note can contain any number of "mentions", which are references to other entities in Nutshell using the syntax @[entityType:id], e.g. @[Accounts:100]. To include a literal string in the format @[something:here], escape the ampersand with a forward slash, e.g. \@[Accounts:100]. Leads can also be mentioned using Lead-id or Lead-number.

If a note contains any mentions, the "mentions" array will contain the stubs corresponding to each mention in the order that they appear. Also, the "note" string will have each mention replaced by the name of the corresponding entity.

The files array is not present at all if there are no files attached to the note.

{
"entityType": "Notes",
"id": 4,
"rev": "152",
"user": User,
"originId": 1,
"note": "Just spoke with Mason Malone about Lead-37741. Nice conversation.",
"noteMarkup": "Just spoke with @[Contacts:12] about Lead-37741. Nice conversation.",
"noteHtml": "Just spoke with <a href="#">Mason Malone</a> about Lead-37741. Nice conversation.",
"date": "2009-11-13T15:23:19-05:00",
"files": [
{
"entityType": "Files",
"id": 429,
"uri": "http://app01.nutshell.com/file/424",
"name": "some_document.pdf",
"mime": "application/pdf",
"rev": "34b3ab3a6a527335eaa98be954a8f3b96632d4ba",
"size": "152533", // in bytes
"clientType": "video/iphone"
}
],
"mentions": [
{
"entityType": "Contacts",
"id": 12,
"rev": 1,
"jobTitle": "Developer",
"name": "Mason Malone",
"stub': true
},
{
"entityType": "Leads",
"id": ,
"rev": 1,
"jobTitle": "Developer",
"name": "Mason Malone",
"stub': true
}
],
// at most one of "lead", "contact", or "account" will be defined
"lead": Lead,
"contact": Contact,
"account": Account,
"primaryAccountName": "Advanced Micro Devices",
"dueTime": "2011-03-08T00:05:07+0000",
"nextStepDueTime": "2011-02-24T00:05:07+0000"
"createdTime": "2010-04-26T15:25:10+0000" // ATOM/rfc3339 format.
}
Returns
array
_renderStub (   $note)
protected

Renders a note stub.

Notes appear in the "notes" array for Accounts, Contacts, and Leads; and a single note may appear in the "logNote" key for an Activity.

The files array is not present at all if there are no files attached to the note.

{
"stub": true,
"entityType": "Notes",
"id": 4,
"rev": "152",
"user": User,
"originId": 1,
"note": "Just spoke with Mason Malone. Nice conversation.",
"noteMarkup": "Just spoke with @[Contacts:12]. Nice conversation.",
"noteHtml": "Just spoke with <a href="#">Mason Malone</a> about Lead-37741. Nice conversation.",
"date": "2009-11-13T15:23:19-05:00",
"files": [
{
"entityType": "Files",
"id": 429,
"uri": "http://app01.nutshell.com/file/424",
"name": "some_document.pdf",
"mime": "application/pdf",
"rev": "34b3ab3a6a527335eaa98be954a8f3b96632d4ba",
"size": "152533", // in bytes
"clientType": "video/iphone"
}
]
}
Returns
array