VB.NET API: Difference between revisions
Line 298: | Line 298: | ||
! '''API Field Name''' | ! '''API Field Name''' | ||
! '''Return value''' | ! '''Return value''' | ||
! '''Field length''' | |||
|- | |- | ||
| Public ReadOnly Property | | Public ReadOnly Property | ||
Line 303: | Line 304: | ||
| FLDCRDRECID | | FLDCRDRECID | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 308: | Line 310: | ||
| FLDCRDASSIGNCARDID | | FLDCRDASSIGNCARDID | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 313: | Line 316: | ||
| FLDCRDCOMPANY | | FLDCRDCOMPANY | ||
| As String | | As String | ||
| 60 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 318: | Line 322: | ||
| FLDCRDCONTACT | | FLDCRDCONTACT | ||
| As String | | As String | ||
| 40 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 323: | Line 328: | ||
| FLDCRDASSISTANT | | FLDCRDASSISTANT | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 328: | Line 334: | ||
| FLDCRDBCRECID | | FLDCRDBCRECID | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 333: | Line 340: | ||
| FLDCRDCARDID2 | | FLDCRDCARDID2 | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 338: | Line 346: | ||
| FLDCRDCARDID3 | | FLDCRDCARDID3 | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 343: | Line 352: | ||
| FLDCRDCARDMESSAGE | | FLDCRDCARDMESSAGE | ||
| As String | | As String | ||
| Unlimited | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 348: | Line 358: | ||
| FLDCRDADDRESS1 | | FLDCRDADDRESS1 | ||
| As String | | As String | ||
| 40 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 353: | Line 364: | ||
| FLDCRDADDRESS2 | | FLDCRDADDRESS2 | ||
| As String | | As String | ||
| 40 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 358: | Line 370: | ||
| FLDCRDADDRESS3 | | FLDCRDADDRESS3 | ||
| As String | | As String | ||
| 40 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 363: | Line 376: | ||
| FLDCRDCITY | | FLDCRDCITY | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 368: | Line 382: | ||
| FLDCRDSTATE | | FLDCRDSTATE | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 373: | Line 388: | ||
| FLDCRDCOUNTRY | | FLDCRDCOUNTRY | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 378: | Line 394: | ||
| FLDCRDZIP | | FLDCRDZIP | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 383: | Line 400: | ||
| FLDCRDCREATEDATE | | FLDCRDCREATEDATE | ||
| As String | | As String | ||
| N/A | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 388: | Line 406: | ||
| FLDCRDCREATEUSERID | | FLDCRDCREATEUSERID | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 393: | Line 412: | ||
| FLDCRDDEAR | | FLDCRDDEAR | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 398: | Line 418: | ||
| FLDCRDDEPARTMENT | | FLDCRDDEPARTMENT | ||
| As String | | As String | ||
| 35 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 403: | Line 424: | ||
| FLDCRDDOCSFOLDER | | FLDCRDDOCSFOLDER | ||
| As String | | As String | ||
| 100 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 408: | Line 430: | ||
| FLDCRDEMAIL1 | | FLDCRDEMAIL1 | ||
| As String | | As String | ||
| 70 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 413: | Line 436: | ||
| FLDCRDEMAIL2 | | FLDCRDEMAIL2 | ||
| As String | | As String | ||
| 70 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 418: | Line 442: | ||
| FLDCRDENTITYKIND | | FLDCRDENTITYKIND | ||
| As String | | As String | ||
| N/A | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 423: | Line 448: | ||
| FLDCRDFAX1 | | FLDCRDFAX1 | ||
| As String | | As String | ||
| 25 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 428: | Line 454: | ||
| FLDCRDFAXDESC1 | | FLDCRDFAXDESC1 | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 433: | Line 460: | ||
| FLDCRDFULLNAME | | FLDCRDFULLNAME | ||
| As String | | As String | ||
| 60 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 438: | Line 466: | ||
| FLDCRDKIND | | FLDCRDKIND | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 443: | Line 472: | ||
| FLDCRDLASTNAME | | FLDCRDLASTNAME | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 448: | Line 478: | ||
| FLDCRDNOTES | | FLDCRDNOTES | ||
| As String | | As String | ||
| Unlimited | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 453: | Line 484: | ||
| FLDCRDPERSONID | | FLDCRDPERSONID | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 458: | Line 490: | ||
| FLDCRDPHNDESC1 | | FLDCRDPHNDESC1 | ||
| As String | | As String | ||
| 40 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 463: | Line 496: | ||
| FLDCRDPHNDESC2 | | FLDCRDPHNDESC2 | ||
| As String | | As String | ||
| 40 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 468: | Line 502: | ||
| FLDCRDPHNDESC3 | | FLDCRDPHNDESC3 | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 473: | Line 508: | ||
| FLDCRDPHNDESC4 | | FLDCRDPHNDESC4 | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 478: | Line 514: | ||
| FLDCRDPHONE1 | | FLDCRDPHONE1 | ||
| As String | | As String | ||
| 25 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 483: | Line 520: | ||
| FLDCRDPHONE2 | | FLDCRDPHONE2 | ||
| As String | | As String | ||
| 25 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 488: | Line 526: | ||
| FLDCRDPHONE3 | | FLDCRDPHONE3 | ||
| As String | | As String | ||
| 25 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 493: | Line 532: | ||
| FLDCRDPHONE4 | | FLDCRDPHONE4 | ||
| As String | | As String | ||
| 25 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 498: | Line 538: | ||
| FLDCRDREGIONCODE | | FLDCRDREGIONCODE | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 503: | Line 544: | ||
| FLDCRDSHOWMESSAGE | | FLDCRDSHOWMESSAGE | ||
| As String | | As String | ||
| 1 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 508: | Line 550: | ||
| FLDCRDSUBCODE | | FLDCRDSUBCODE | ||
| As String | | As String | ||
| 15 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 513: | Line 556: | ||
| FLDCRDSUFFIX | | FLDCRDSUFFIX | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 518: | Line 562: | ||
| FLDCRDTAXCODE1 | | FLDCRDTAXCODE1 | ||
| As String | | As String | ||
| 3 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 523: | Line 568: | ||
| FLDCRDTAXCODE2 | | FLDCRDTAXCODE2 | ||
| As String | | As String | ||
| 3 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 528: | Line 574: | ||
| FLDCRDTITLE | | FLDCRDTITLE | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 533: | Line 580: | ||
| FLDCRDUPDATEUSERID | | FLDCRDUPDATEUSERID | ||
| As String | | As String | ||
| 20 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 538: | Line 586: | ||
| FLDCRDURL1 | | FLDCRDURL1 | ||
| As String | | As String | ||
| 100 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 543: | Line 592: | ||
| FLDCRDURL2 | | FLDCRDURL2 | ||
| As String | | As String | ||
| 100 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 548: | Line 598: | ||
| FLDCRDUSER1 | | FLDCRDUSER1 | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 553: | Line 604: | ||
| FLDCRDUSER2 | | FLDCRDUSER2 | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 558: | Line 610: | ||
| FLDCRDUSER3 | | FLDCRDUSER3 | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 563: | Line 616: | ||
| FLDCRDUSER4 | | FLDCRDUSER4 | ||
| As String | | As String | ||
| 30 | |||
|- | |- | ||
| Public Property | | Public Property | ||
Line 568: | Line 622: | ||
| FLDCRDUSER5 | | FLDCRDUSER5 | ||
| As String | | As String | ||
| 30 | |||
|} | |} | ||
Revision as of 10:50, 2 March 2011
Disclaimer
This documentation refers to CommitCRM 5.6 or later version and assumes CommitCRM is installed and accessible on the local computer.
Introduction
This document demonstrates how to use the CommitCRM VB.NET API library in order to programmatically connect to your CommitCRM server and query or manipulate the CommitCRM database.
System Requirements
- CommitCRM 5.6 or later.
- Visual Basic .NET 2008 or Visual Basic .NET 2010.
- CommitLib.dll (the CommitCRM VB.NET compiled library).
Getting Started
After you create your VB.NET project, you'll need to add a reference to the CommitLib.dll file, in order to have access to the CommitCRM library classes.
Each application using the library will have to initialize on startup the CommitCRM.Application object and terminate it on exit. Initialization method requires that you pass an object instance of CommitCRM.Config class configured with the following settings:
- AppName
- This is free text, preferably the name of your application.
- CommitDllFolder
- Behind the scenes the library uses the two CommitCRM API dlls: CmtDbEng.dll and CmtDbQry.dll.
- In the default CommitCRM installation you'll find these files in 'C:\Commit\ThirdParty\UserDev'.
- Important Note: Always point to this folder and do not copy the dll files elsewhere. This is because when the CommitCRM version upgrade runs it also upgrades the dll files stored in this folder. This verifies that you will always be using the latest release.
- CommitDbFolder
- Path to the CommitCRM database, default is 'C:\Commit\db'.
Assuming these default values, we can configure the CommitCRM.Config object like this:
Dim config As New CommitCRM.Config config.AppName = "VB.NET Demo" config.CommitDllFolder = "C:\Commit\ThirdParty\UserDev" config.CommitDbFolder = "C:\Commit\db"
You should of course check where these paths are exactly on your disk and modify these values accordingly.
Now we can initialize the CommitCRM.Application object with these settings:
CommitCRM.Application.Initialize(config)
If anything goes wrong, the above line will throw an exception of the CommitCRM.Exception class. To prevent unexpected termination of the program execution, we recommend having any call to the CommitCRM library enclosed in a Try/Catch block.
Before exit, we terminate the CommitCRM.Application object:
CommitCRM.Application.Terminate()
The most basic VB.NET application that just connects to CommitCRM and terminates could look something like this:
Try Dim config As New CommitCRM.Config config.AppName = "VB.NET Demo" config.CommitDllFolder = "C:\Commit\ThirdParty\UserDev" config.CommitDbFolder = "C:\Commit\db" CommitCRM.Application.Initialize(config) 'At this point we have successfully initialized the CommitCRM.Application 'and can start using the other library classes Catch ex As Exception Console.Out.Write(ex.Message) Finally CommitCRM.Application.Terminate() End Try
Now that we have confirmed the connectivity to the CommitCRM server (if the above code successfully runs), we can continue adding more functionality to the example.
The library exposes as VB.NET classes the same CommitCRM objects (Account, Ticket etc.) available through the native CommitCRM API and you can refer to the API Reference Manual for database fields reference.
With any of these objects you can:
- Search and query for objects with CommitCRM.ObjectQuery that satisfy certain criteria.
- Read and display the properties of the retrieved objects.
- Update and save the properties of the retrieved objects.
- Create and save new objects.
Now let's see how we can search for CommitCRM.Account objects.
We instantiate an object of the CommitCRM.ObjectQuery class and pass CommitCRM.Account class as generics parameter.
Dim accountSearch As New CommitCRM.ObjectQuery(Of CommitCRM.Account)
CommitCRM.ObjectQuery class can accept any of the CommitCRM objects in this parameter, but we want to search for accounts now.
Next, we need to set criteria (or more than one) we want to search for:
accountSearch.AddCriteria("FLDCRDCITY", CommitCRM.OperatorEnum.opEqual, "New York")
The first parameter to the AddCriteria method is the field name we want to look in. Refer to Account_Fields for a complete list of the available fields for the CommitCRM.Account class.
The second parameter is a compare operator. We here use the CommitCRM.OperatorEnum.opEqual to get only exact matches. In order to get a broader match in the results you can use CommitCRM.OperatorEnum.opLike operator.
The third parameter is the value we want to find. Prepending and/or appending % (percent) sign at the beginning and/or at the end while using CommitCRM.OperatorEnum.opLike operator, will match the phrase even if in the middle of a sentence.
Now we can execute the search and retrieve the CommitCRM.Account objects (if any):
Dim accounts As List(Of CommitCRM.Account) = accountSearch.FetchObjects()
The above line will populate the List (System.Collections.Generic.List) with all CommitCRM.Account objects that were found. Now we can use For Each - Next statement to iterate through the accounts:
For Each account In accounts Console.Out.Write(account.CompanyName + vbCrLf) Next
Or we can manipulate these accounts:
For Each account In accounts If account.Zip.Length = 0 Then account.Zip = "10001" account.Save() End If Next
We invoke the CommitCRM.Account's Save method on both new or existing accounts. For a new account, invoking the Save method would insert a new account in the CommitCRM database. For an existing account, invoking the Save method would update the fields we modified in the existing account. This rule applies to all CommitCRM objects.
Another options is to add a new ticket for each of the accounts:
For Each account In accounts Dim ticket As New CommitCRM.Ticket ticket.AccountREC_ID = account.AccountREC_ID ticket.Description = "Sample ticket for a NewYork account" ticket.Save() Next
Each of the CommitCRM library objects have a set of properties that are exposed as VB.NET properties that you can directly manipulate or read from. You already saw few examples of these properties in the above examples, as: account.Zip or ticket.Description. This is the preferred and more intuitive way of accessing the CommitCRM fields. However, there is also another way of achieving the same results, by invoking GetFieldValue and SetFieldValue and specifying the internal field name.
Here is an equivalent of the above example that uses these two generic methods, instead of the object's properties:
For Each account In accounts Dim ticket As New CommitCRM.Ticket ticket.SetFieldValue("FLDTKTCARDID", account.GetFieldValue("FLDCRDRECID")) ticket.SetFieldValue("FLDTKTPROBLEM", "Sample ticket for a NewYork account") ticket.Save() Next
Exception Handling
While working with the CommitCRM VB.NET library, some operations can fail. In this case the library will throw an exception of the CommitCRM.Exception class. We recommend enclosing all calls to the CommitCRM library in a Try/Catch block.
To find out more about the exact error that ocured when an exception is thrown, you can inspect the CommitCRM.Exception.Status property that holds the last CommitCRM Status value, or inspect the list of CommitCRM.Exception.Codes (if any). Please refer to Error Codes Description for the description of these values.
Complete Program Sample
Module Module1 Sub Main() Try 'Setup the CommitCRM.Config object Dim config As New CommitCRM.Config config.AppName = "VB.NET Demo" config.CommitDllFolder = "C:\Commit\ThirdParty\UserDev" config.CommitDbFolder = "C:\Commit\db" 'Initialize the CommitCRM.Application CommitCRM.Application.Initialize(config) 'At this point we have successfully initialized the CommitCRM.Application 'and can start using the other library classes 'search for "New York" in the FLDCRDCITY field Dim accountSearch As New CommitCRM.ObjectQuery(Of CommitCRM.Account) accountSearch.AddCriteria("FLDCRDCITY", CommitCRM.OperatorEnum.opEqual, "New York") Dim accounts As List(Of CommitCRM.Account) = accountSearch.FetchObjects() 'loop through the retrieved accounts and output the CompanyName For Each account In accounts Console.Out.Write(account.CompanyName + vbCrLf) Next Catch ex As CommitCRM.Exception 'here we catch commit specific error 'we can inspect the Commit status (exc.Status) 'exc.Codes contains all error codes last call generated 'here we show the error message Console.Out.Write(ex.Message) Catch ex As Exception Console.Out.Write(ex.Message) Finally CommitCRM.Application.Terminate() End Try End Sub End Module
Classes and Objects
The CommitCRM VB.NET API provides easy access to all objects using a class for each entity in the system (such as Account, Ticket, Asset, etc.).
All classes include:
- API functions and routines (which are derived from the base CommitCRM.Object class).
- Class data fields, providing an easy way to update the object's data.
All CommitCRM's objects should be updated by setting the class data fields and then calling Save method.
Another option is using SetFieldData and GetFieldData, which provide low-level access to data fields. This option should only be used if necessary, for example, when updating user-defined fields which are not part of the class basic fields.
Object Class
The CommitCRM.Object class is the base class for all CommitCRM accessible objects (as Ticket, Account, Asset, etc.). The public routines and functions exposed by the CommitCRM.Object class are available to the derived classes.
Object Method Reference Table
Access modifier | Method | Arguments | Return value | Description |
---|---|---|---|---|
Public Sub | SetFieldValue | (sKey As String, sValue As String) | Assigns the value (sValue) of the field passed in sKey argument. Save must be called for the change to take effect. | |
Public Function | GetFieldValue | (sKey As String) | As String | Retrieves the value of the field passed in sKey argument. |
Public Sub | Reload | () | Reloads the Object values from the database. The value of the object unique identifier (REC_ID, the exact name depends on the concrete derived object class) | |
Public Sub | Reinit | (sID As String) | Same as Reload except the unique identifier is passed as argument. | |
Public Sub | Save | () | Saves all modified properties of the object to the database. |
Account Class
The CommitCRM.Account class derives from CommitCRM.Object and encapsulates the Account Fields. The following table lists all exposed CommitCRM.Account properties.
Account Properties Reference Table
Access modifier | Property | API Field Name | Return value | Field length |
---|---|---|---|---|
Public ReadOnly Property | AccountREC_ID | FLDCRDRECID | As String | 20 |
Public Property | AccountManager | FLDCRDASSIGNCARDID | As String | 20 |
Public Property | CompanyName | FLDCRDCOMPANY | As String | 60 |
Public Property | Contact | FLDCRDCONTACT | As String | 40 |
Public Property | Assistant | FLDCRDASSISTANT | As String | 20 |
Public Property | ContractREC_ID | FLDCRDBCRECID | As String | 20 |
Public Property | AccountNumber | FLDCRDCARDID2 | As String | 15 |
Public Property | ID | FLDCRDCARDID3 | As String | 15 |
Public Property | PopupMessage | FLDCRDCARDMESSAGE | As String | Unlimited |
Public Property | AddressLine1 | FLDCRDADDRESS1 | As String | 40 |
Public Property | AddressLine2 | FLDCRDADDRESS2 | As String | 40 |
Public Property | AddressLine3 | FLDCRDADDRESS3 | As String | 40 |
Public Property | City | FLDCRDCITY | As String | 30 |
Public Property | Country | FLDCRDSTATE | As String | 20 |
Public Property | State | FLDCRDCOUNTRY | As String | 30 |
Public Property | Zip | FLDCRDZIP | As String | 15 |
Public Property | CreationDate | FLDCRDCREATEDATE | As String | N/A |
Public Property | CreatedByUser | FLDCRDCREATEUSERID | As String | 20 |
Public Property | Dear | FLDCRDDEAR | As String | 20 |
Public Property | Department | FLDCRDDEPARTMENT | As String | 35 |
Public Property | DocumentsStoreDirectory | FLDCRDDOCSFOLDER | As String | 100 |
Public Property | EmailAddress1 | FLDCRDEMAIL1 | As String | 70 |
Public Property | EmailAddress2 | FLDCRDEMAIL2 | As String | 70 |
Public Property | AccountType | FLDCRDENTITYKIND | As String | N/A |
Public Property | FaxNumber | FLDCRDFAX1 | As String | 25 |
Public Property | FaxNumberExt | FLDCRDFAXDESC1 | As String | 15 |
Public Property | FileAs | FLDCRDFULLNAME | As String | 60 |
Public Property | Type | FLDCRDKIND | As String | 30 |
Public Property | LastName | FLDCRDLASTNAME | As String | 20 |
Public Property | Notes | FLDCRDNOTES | As String | Unlimited |
Public Property | Field | FLDCRDPERSONID | As String | 20 |
Public Property | Phone1Ext | FLDCRDPHNDESC1 | As String | 40 |
Public Property | Phone2Ext | FLDCRDPHNDESC2 | As String | 40 |
Public Property | Phone3Ext | FLDCRDPHNDESC3 | As String | 15 |
Public Property | Phone4Ext | FLDCRDPHNDESC4 | As String | 15 |
Public Property | Phone1 | FLDCRDPHONE1 | As String | 25 |
Public Property | Phone2 | FLDCRDPHONE2 | As String | 25 |
Public Property | Phone3 | FLDCRDPHONE3 | As String | 25 |
Public Property | Phone4 | FLDCRDPHONE4 | As String | 25 |
Public Property | Region | FLDCRDREGIONCODE | As String | 15 |
Public Property | PopupMessageDisplayIndication | FLDCRDSHOWMESSAGE | As String | 1 |
Public Property | SubContractCode | FLDCRDSUBCODE | As String | 15 |
Public Property | Salutation | FLDCRDSUFFIX | As String | 20 |
Public Property | Tax1 | FLDCRDTAXCODE1 | As String | 3 |
Public Property | Tax2 | FLDCRDTAXCODE2 | As String | 3 |
Public Property | Title | FLDCRDTITLE | As String | 30 |
Public Property | LastUpdatedBy | FLDCRDUPDATEUSERID | As String | 20 |
Public Property | WebAddress1 | FLDCRDURL1 | As String | 100 |
Public Property | WebAddress2 | FLDCRDURL2 | As String | 100 |
Public Property | Status | FLDCRDUSER1 | As String | 30 |
Public Property | Field1 | FLDCRDUSER2 | As String | 30 |
Public Property | Field2 | FLDCRDUSER3 | As String | 30 |
Public Property | Field3 | FLDCRDUSER4 | As String | 30 |
Public Property | Field4 | FLDCRDUSER5 | As String | 30 |
Ticket Class
The CommitCRM.Ticket class derives from CommitCRM.Object and encapsulates the Ticket Fields. The following table lists all exposed CommitCRM.Ticket properties.
Ticket Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | TicketREC_ID | FLDTKTRECID | As String |
Public Property | AccountREC_ID | FLDTKTCARDID | As String |
Public Property | AssetREC_ID | FLDTKTASSETRECID | As String |
Public Property | ContactREC_ID | FLDTKTCONTACTID | As String |
Public Property | ContractREC_ID | FLDTKTBCRECID | As String |
Public Property | EmployeeREC_ID | FLDTKTWORKERID | As String |
Public Property | TicketPriority | FLDTKTPRIORITY | As String |
Public Property | TicketNumber | FLDTKTTICKETNO | As String |
Public Property | Description | FLDTKTPROBLEM | As String |
Public Property | TicketType | FLDTKTKIND | As String |
Public Property | Source | FLDTKTSOURCE | As String |
Public Property | EstimatedDurationTime | FLDTKTSCHEDLENESTIM | As String |
Public Property | ShowTicketInDispatcher | FLDTKTFORDISPATCH | As String |
Public Property | Status | FLDTKTSTATUS | As String |
Public Property | CreatedByUser | FLDTKTCREATEUSER | As String |
Public Property | DueDate | FLDTKTDUEDATETIME | As String |
Public Property | Resolution | FLDTKTSOLUTION | As String |
Public ReadOnly Property | UpdateDate | FLDTKTUPDATEDATE | As String |
Asset Class
The CommitCRM.Asset class derives from CommitCRM.Object and encapsulates the Asset Fields. The following table lists all exposed CommitCRM.Asset properties.
Asset Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | AssetREC_ID | FLDASTRECID | As String |
Public Property | AssetCode | FLDASTASSETCODE | As String |
Public Property | AssetType | FLDASTASSETTYPE | As String |
Public Property | AssetName | FLDASTNAME | As String |
Public Property | Status | FLDASTSTATUS | As String |
Public Property | SerialNo | FLDASTSERIALNO | As String |
Public Property | AccountREC_ID | FLDASTACCRECID | As String |
Public Property | ContactREC_ID | FLDASTCONTACTRECID | As String |
Public Property | CreatedByUser | FLDASTCREATEUSER | As String |
Public Property | PurchaseDate | FLDASTCUSTPURDATE | As String |
Public Property | PurchasedFromUs | FLDASTCUSTPURFROMUS | As String |
Public Property | PurchaseInvoice | FLDASTCUSTPUROURINV | As String |
Public Property | CustomerPO | FLDASTCUSTPURPO | As String |
Public Property | PurchasePrice | FLDASTCUSTPURPRICE | As String |
Public Property | DeliveredDate | FLDASTDELIVEDATE | As String |
Public Property | Description | FLDASTDESC | As String |
Public Property | InstalledBy | FLDASTINSTALBY | As String |
Public Property | InstalledDate | FLDASTINSTALDATE | As String |
Public Property | LicenseCodes | FLDASTLICENSECODE | As String |
Public Property | LicenseKeys | FLDASTLICENSEKEYS | As String |
Public Property | LicenseNotes | FLDASTLICENSENOTES | As String |
Public Property | Location | FLDASTLOCATION | As String |
Public Property | Manufacturer | FLDASTMANUFACTURER | As String |
Public Property | MnfSerialNo | FLDASTMNFSERIALNO | As String |
Public Property | Model | FLDASTMODEL | As String |
Public Property | Notes | FLDASTNOTES | As String |
Public Property | Quantity | FLDASTQUANTITY | As String |
Public Property | LastUpdateBy | FLDASTUPDATEUSER | As String |
Public Property | Field1 | FLDASTUSER1 | As String |
Public Property | Field2 | FLDASTUSER2 | As String |
Public Property | Field3 | FLDASTUSER3 | As String |
Public Property | Field4 | FLDASTUSER4 | As String |
Public Property | Field5 | FLDASTUSER5 | As String |
Public Property | Date1 | FLDASTUSERDATE1 | As String |
Public Property | Number1 | FLDASTUSERNUMBER1 | As String |
Public Property | VendorPurchasedDate | FLDASTVENDORDATEPURC | As String |
Public Property | VendorInvoice | FLDASTVENDORINVNO | As String |
Public Property | VendorPO | FLDASTVENDOROURPO | As String |
Public Property | VendorPrice | FLDASTVENDORPRICE | As String |
Public Property | Vendor | FLDASTVENDORRECID | As String |
Public Property | VendorSerialNo | FLDASTVENDORSERNO | As String |
Public Property | VendorWarrantyExpDate | FLDASTVENDORWARREXP | As String |
Public Property | Version | FLDASTVERSION | As String |
Public Property | WarrantyLicenseExp | FLDASTWARREXPDATE | As String |
Calendar Class
The CommitCRM.Calendar class derives from CommitCRM.Object and encapsulates the Calendar Fields. The following table lists all exposed CommitCRM.Calendar properties.
Calendar Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | CalendarREC_ID | FLDEVTRECID | As String |
Public Property | EventType | FLDEVTWRITETOID | As String |
Public Property | EmployeeREC_ID | FLDEVTWORKERID | As String |
Public Property | PrivateUser | FLDEVTPRIVATEID | As String |
Public Property | AccountREC_ID | FLDEVTCARDID | As String |
Public Property | ContactREC_ID | FLDEVTCONTACTID | As String |
Public Property | DocumentREC_ID | FLDEVTDOCID | As String |
Public Property | DoneIndication | FLDEVTDONE | As String |
Public Property | [Date] | FLDEVTEVENTDATE | As String |
Public Property | Description | FLDEVTFREETEXT | As String |
Public Property | TimeStart | FLDEVTFROMTIME | As String |
Public Property | TimeEnd | FLDEVTTOTIME | As String |
Public Property | RelLinkREC_ID | FLDEVTLINKRECID | As String |
Public Property | Field1 | FLDEVTFAMILY | As String |
Public Property | Field2 | FLDEVTACTION | As String |
Public Property | Field3 | FLDEVTPLACE | As String |
Public Property | Field4 | FLDEVTPLACE1 | As String |
Public Property | Field5 | FLDEVTPLACE2 | As String |
Public Property | CreatedByUser | FLDEVTCREATEUSERID | As String |
Public Property | LastUpdateByUser | FLDEVTUPDATEUSER | As String |
Charge Class
The CommitCRM.Charge class derives from CommitCRM.Object and encapsulates the Charge Fields. The following table lists all exposed CommitCRM.Charge properties.
Charge Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | ChargeREC_ID | FLDSLPRECID | As String |
Public Property | ChargeSource | FLDSLPSOURCERECID | As String |
Public Property | AccountREC_ID | FLDSLPCARDID | As String |
Public Property | EmployeeREC_ID | FLDSLPWORKERID | As String |
Public Property | ChargedItem | FLDSLPITEMID | As String |
Public Property | ContractREC_ID | FLDSLPBCRECID | As String |
Public Property | TicketREC_ID | FLDSLPTICKETID | As String |
Public Property | [Date] | FLDSLPSLIPDATE | As String |
Public Property | Description | FLDSLPDESC | As String |
Public Property | Units_Hours | FLDSLPQUANTITY | As String |
Public Property | AdjustAmount | FLDSLPADJUSTAMOUNT | As String |
Public Property | AdjustPercent | FLDSLPADJUSTPERCENT | As String |
Public Property | FromTime | FLDSLPSTARTTIME | As String |
Public Property | ToTime | FLDSLPENDTIME | As String |
Public Property | Price_Rate | FLDSLPPRICE | As String |
Public Property | Billable | FLDSLPBILLKIND | As String |
Public Property | Billed | FLDSLPSTAGE | As String |
Public Property | Field1 | FLDSLPUSER1 | As String |
Public Property | CreateUser | FLDSLPCREATEUSER | As String |
Document Class
The CommitCRM.Document class derives from CommitCRM.Object and encapsulates the Document Fields. The following table lists all exposed CommitCRM.Document properties.
Document Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | DocumentREC_ID | FLDDOCRECID | As String |
Public Property | DocumentDate | FLDDOCDOCDATE | As String |
Public Property | Subject | FLDDOCDOCUMENTDESC | As String |
Public Property | RelLinkREC_ID | FLDDOCLINKRECID | As String |
Public Property | AccountREC_ID | FLDDOCCARDID | As String |
Public Property | ContactREC_ID | FLDDOCCONTACTID | As String |
Public Property | Field1 | FLDDOCTRANSPORT | As String |
Public Property | Field2 | FLDDOCFOLDER | As String |
Public Property | Field3 | FLDDOCUMENTPLACE | As String |
Public Property | FilePathAndName | FLDDOCDOCUMENTNAME | As String |
Public Property | Category | FLDDOCTREEID | As String |
Public Property | EmployeeREC_ID | FLDDOCWORKERID | As String |
Public Property | CreatedByUser | FLDDOCCREATEUSER | As String |
Public Property | LastUpdateByUser | FLDDOCUPDATEUSER | As String |
HistoryNote Class
The CommitCRM.HistoryNote class derives from CommitCRM.Object and encapsulates the History Note Fields. The following table lists all exposed CommitCRM.HistoryNote properties.
HistoryNote Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | HistoryNoteREC_ID | FLDHISRECID | As String |
Public Property | [Date] | FLDHISNOTEDATETIME | As String |
Public Property | Description | FLDHISDESCRIPTION | As String |
Public Property | RelLinkREC_ID | FLDHISLINKRECID | As String |
Public Property | Field | FLDHISUSER1 | As String |
Public Property | About | FLDHISKIND | As String |
Public Property | EmployeeREC_ID | FLDHISWORKERID | As String |
Public Property | AccountREC_ID | FLDHISCARDID | As String |
Public Property | Contact | FLDHISCONTACTID | As String |
Public Property | DocumentREC_ID | FLDHISDOCID | As String |
Public Property | CreatedByUser | FLDHISCREATEUSER | As String |
Item Class
The CommitCRM.Item class derives from CommitCRM.Object and encapsulates the Item Fields. The following table lists all exposed CommitCRM.Item properties.
Item Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | ItemREC_ID | FLDITMRECID | As String |
Public Property | ItemGroup | FLDITMITEMTYPEGROUP | As String |
Public Property | ItemCode | FLDITMITEMNO | As String |
Public Property | ItemName | FLDITMNAME | As String |
Public Property | PriceSource | FLDITMPRICESOURCE | As String |
Public Property | PricePerHour_Unit | FLDITMUNITISHOUR | As Double |
Public Property | Price | FLDITMUNITPRICE | As Double |
Public Property | Cost | FLDITMSTANDARDCOST | As String |
Public Property | Tax1 | FLDITMTAXCODE1 | As String |
Public Property | Tax2 | FLDITMTAXCODE2 | As String |
Public Property | Tax3 | FLDITMTAXCODE3 | As String |
Public Property | DescriptionByName | FLDITMDESCBYNAME | As String |
Public Property | Description | FLDITMDESC | As String |
Public Property | Suspend | FLDITMSUSPENDED | As String |
Public Property | Notes | FLDITMNOTES | As String |
Public Property | Field1 | FLDITMUSER1 | As String |
Public Property | CreateUser | FLDITMCREATEUSER | As String |
KnowledgeBaseArticle Class
The CommitCRM.KnowledgeBaseArticle class derives from CommitCRM.Object and encapsulates the Knowledge Base Article Fields. The following table lists all exposed CommitCRM.KnowledgeBaseArticle properties.
KnowledgeBaseArticle Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | KnowledgeBaseArticleREC_ID | FLDKBARECID | As String |
Public Property | DocumentDate | FLDKBACREATEDATE | As String |
Public Property | Title | FLDKBATITLE | As String |
Public Property | Problem | FLDKBAPROBLEM | As String |
Public Property | Solution | FLDKBASOLUTION | As String |
Public Property | Status | FLDKBASTATUS | As String |
Public Property | Category | FLDKBACATEGORY | As String |
Public Property | [Public] | FLDKBAISPUBLIC | As String |
Public Property | CreatedByUser | FLDKBACREATEUSER | As String |
Public Property | LastUpdateByUser | FLDKBAUPDATEUSER | As String |
Opportunity Class
The CommitCRM.Opportunity class derives from CommitCRM.Object and encapsulates the Opportunity Fields. The following table lists all exposed CommitCRM.Opportunity properties.
Opportunity Properties Reference Table
Access modifier | Property | API Field Name | Return value |
---|---|---|---|
Public ReadOnly Property | OpportunityREC_ID | FLDOPPRECID | As String |
Public Property | OpportunityName | FLDOPPNAME | As String |
Public Property | OpportunityID | FLDOPPUSERID | As String |
Public Property | AccountREC_ID | FLDOPPCARDID | As String |
Public Property | Source | FLDOPPSOURCE | As String |
Public Property | CloseDate | FLDOPPCLOSEDATE | As String |
Public Property | Manager | FLDOPPWORKERID | As String |
Public Property | OpenDate | FLDOPPOPENDATE | As String |
Public Property | CloseByDate | FLDOPPESTDATE | As String |
Public Property | Amount | FLDOPPAMOUNT | As String |
Public Property | Probability | FLDOPPPROBABILITY | As String |
Public Property | Stage | FLDOPPSTAGE | As String |
Public Property | Status | FLDOPPSTATUS | As String |
Public Property | ClosingAmount | FLDOPPCLOSEAMOUNT | As String |
Public Property | Description | FLDOPPDESCRIPTION | As String |
Public Property | OpportunityType | FLDOPPKIND | As String |
Public Property | OpportunityReason | FLDOPPREASON | As String |
Public Property | Note | FLDOPPNOTES | As String |
Public Property | Territory | FLDOPPREGION | As String |
Public Property | Field1 | FLDOPPUSER1 | As String |
Public Property | Field2 | FLDOPPUSER2 | As String |
Public Property | Field3 | FLDOPPUSER3 | As String |
Public Property | CreatedByUser | FLDOPPCREATEUSERID | As String |
Public Property | LastUpdateByUser | FLDOPPUPDATEUSER | As String |