NetSuite Data Provider - Online Help
NetSuite Data Provider
Questions / Feedback?

Invoking UI Elements

You can access NetSuite in VBA by implementing the ExcelComModule class; this class exposes the methods listed in Macro (VBA) Functions as well as the following methods, which you can use to invoke the functionality of various UI elements from VBA code:

Function RefreshAll()

Refreshes all worksheets with data from the add-in.

Function Refresh()

Refreshes the selected worksheet to match the data from the data source. This allows you save your query.

Function UpdateAll()

Saves all changes in the worksheet to the data source.

Function Update(Long() selectedRows) As String()

Saves the selected changes to the data source. Returns a string array of success or failure values for each row, in the form [SUCCESS|ERROR][:Error Message].

Function Delete(Long() selectedRows) As String()

Deletes the specified rows. Returns a string array of success or failure values for each row, in the form [SUCCESS|ERROR][:Error Message].

Function Insert(Long() selectedRows) As String()

Inserts the specified rows. Returns a string array of success or failure values for each row, in the form [SUCCESS|ERROR][:Error Message].

Function Revert(Long() selectedRows) As String()

Reverts the specified rows. This replaces local changes with the data from the data source from the results of reverting each row. Returns an array of success or failure values, in the form [SUCCESS|ERROR][:Error Message].

Function GetUpdatedRows() As Long()

Returns an array of longs that correspond to the changed row numbers.

Function GetInsertedRows() As Long()

Returns an array of longs that correspond to the changed row numbers.

Retrieve Data or Save Changes

To save changes to the data source, use the Update or UpdateAll methods. To retrieve the current records from the data source, use Refresh or RefreshAll. Use Revert to replace selected local changes with the current data from the data source. Note that when calling Refresh and RefreshAll, any unsaved changes will be lost.

To call any of the available methods listed above or in Macro (VBA) Functions , instantiate a COM module. For example:

Dim addin As COMAddIn
Dim adxModule As Object
Dim arr() As Long
Set addin = Application.COMAddIns.Item("RSSBus.ExcelAddIn.ExcelAddInModule")
Set adxModule = addin.Object
arr = adxModule.GetUpdatedRows()
adxModule.Update(arr)

 
 
Copyright (c) 2015 RSSBus, Inc. - All rights reserved.
Build 1.0.5577.0