Jamesbrendamour's picture
|
download
raw
2.53 kB
metadata
title: List Vendors (Legacy) - Sage Intacct SDK for Node.js | Sage Intacct Developer
url: https://developer.intacct.com/tools/sdk-node-js/list-vendors/

List Vendors (Legacy) - Sage Intacct SDK for Node.js | Sage Intacct Developer

Overview

Getting Started

List AR Invoices

List Vendors (Legacy)

CRUD Customer

Custom Object Function

  • Prerequisites
  • Run the example
  • Extra credit
    • Filter the results
    • Try a different object
  • What’s next?

This example shows you how to:

  • Execute a query to list vendors.
  • Read any additional paginated results from the query.

Prerequisites

  • You have downloaded or cloned the Sage Intacct SDK for Node.js examples.
  • You successfully ran the getting started example—in particular, you set up the credentials.ini file required by bootstrap.js.
  • The company you are using has multiple vendor records.
  • The user you are using has list and view permissions for the vendor object.

Run the example

  1. Run the list-vendors.js file:

    node list-vendors.js
    
  2. Observe the terminal output.

    The number of vendor records found and each page remaining echo to the terminal:

    Page 1 success! Number of vendor records found: 14. Number remaining: 12
    Page 2 success! Records remaining: 10
    Page 3 success! Records remaining: 8
    Page 4 success! Records remaining: 6
    Successfully read 4 pages
    
  3. Open the generated logs/intacct.log file in a text editor and review the entries.

    The file provides info and debug entries. The SDK provides a debug entry for each HTTP request/response (with the Sage Intacct endpoint).

    Note that the log file was created by the logger set in the client config.


Extra credit

Filter the results

  1. Set an Intacct/SDK/Functions/Common/Query on the ReadByQuery object to filter the number of results. For example, add the following to the example to list only active vendors:

    let where = new IA.Functions.Common.Query.Comparison.EqualTo.EqualToString();
    where.field = "STATUS";
    where.value = "T";
    query.query = where;
    

Try a different object

  1. Query for APBILL objects by changing the ObjectName property, as follows:

    query.objectName = "APBILL";
    
  2. Modify the query.fields list to return the information you want.


What’s next?

  • Try an example that creates, reads, updates, and deletes a customer.
  • Browse the reference documentation for the SDK.

Provide feedback

Xet Storage Details

Size:
2.53 kB
·
Xet hash:
e6317a6c587425cded232a5a68c3985536f903f7e534dda175dd110c4b3805c9

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.