This example shows you how to:


Prerequisites


Run the example

  1. Run the project, and when prompted, enter 3 and press enter:

    "C:\Program Files\dotnet\dotnet.exe" Intacct.Examples/bin/Debug/netcoreapp2.0/Intacct.Examples.dll
       
    Pick an option to run:
     1 - Getting started
     2 - List vendors
     3 - CRUD customer
     4 - Custom object function
    
  2. Observe the terminal output.

    Information is echoed for each customer API function executed:

    Created inactive customer ID 10066
    Updated customer ID 10066 to active
    Read customer ID 10066
    Deleted customer ID 10066
    
  3. Open the generated Intacct.Examples/bin/Debug/netcoreapp2.0/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 HTML logger set in the client config.


Extra credit

Get a customer by name

  1. Execute a ReadByName function (instead of Read):

    ReadByName readByName = new ReadByName()
    {
        ObjectName = "CUSTOMER",
        Fields = {
            "RECORDNO",
            "CUSTOMERID",
            "STATUS",
        },
        Names = {
            customerId,
        }
    };
       
    Task<OnlineResponse> readByNameTask = client.Execute(readByName);
    readByNameTask.Wait();
       
    Console.WriteLine("Read customer ID " + customerId + " using ReadByName");
    

Try a different object

  1. Try a different object’s CRUD functions from the Intacct.SDK.Functions namespace.

What’s next?

Provide feedback