This example shows you how to:


Prerequisites


Run the example

  1. Run the project, and enter 2 when prompted.

    For example, the following runs the project from the command line:

    cd Intacct.Examples
    "C:\Program Files\dotnet\dotnet.exe" bin/Debug/netcoreapp2.0/Intacct.Examples.dll
    
  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. Type 5 to exit the program.

  4. 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 logger set in the client config.


Extra credit

Filter the results

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

    EqualToString where = new EqualToString()
    {
        Field = "STATUS",
        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?

Provide feedback