Buckets:
| title: CRUD Customer - Sage Intacct SDK for Node.js | Sage Intacct Developer | |
| url: https://developer.intacct.com/tools/sdk-node-js/crud-customer/ | |
| # CRUD Customer - 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 | |
| + Get a customer by name | |
| + Try a different object | |
| * What’s next? | |
| --- | |
| This example shows you how to: | |
| * Create a customer | |
| * Read a customer | |
| * Update a customer | |
| * Delete a customer | |
| --- | |
| ## 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 user you are using has add, edit, delete, list, and view permissions for the customer object. | |
| --- | |
| ## Run the example | |
| 1. Run the `crud-customer.js` file: | |
| ```xml | |
| node crud-customer.js | |
| ``` | |
| 2. Observe the terminal output. | |
| Information is echoed for each customer API function executed: | |
| ```xml | |
| Created inactive customer ID 10066 | |
| Updated customer ID 10066 to active | |
| Read customer ID 10066 | |
| Deleted customer ID 10066 | |
| ``` | |
| 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 | |
| ### Get a customer by name | |
| 1. Execute a `ReadByName` function (instead of `Read`): | |
| ```xml | |
| let readByName = new IA.Functions.Common.ReadByName(); | |
| readByName.objectName = "CUSTOMER"; | |
| readByName.fields = [ | |
| "RECORDNO", | |
| "CUSTOMERID", | |
| "STATUS", | |
| ]; | |
| readByName.names = [ | |
| customerId, | |
| ]; | |
| const readByNameResponse = await client.execute(readByName); | |
| console.log("Read customer ID " + customerId + " using ReadByName"); | |
| ``` | |
| ### Try a different object | |
| 1. Try a different object’s CRUD functions from the `Intacct/SDK/Functions` module. | |
| --- | |
| ## What’s next? | |
| * Try an example that implements the `IFunction` interface for use with a custom object. | |
| * Browse the reference documentation for the SDK. | |
| Provide feedback | |
Xet Storage Details
- Size:
- 2.36 kB
- Xet hash:
- 883bf2737d7297e9063209f8e6d7919907737130c653a60e415bfa9da6dfeaff
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.