acumatica

Topics related to acumatica:

Getting started with acumatica

This section provides an overview of what acumatica is, and why a developer might want to use it.

It should also mention any large subjects within acumatica, and link out to the related topics. Since the Documentation for acumatica is new, you may need to create initial versions of those related topics.

Populating report with data through code

Adding Attribute Support to out-of-box Sales Order Entity

This example is applicable to Acumatica 6.0 series

Acumatica Platform Attributes Reference

Changing caption dynamically using readonly DAC fields.

Freight Calculation

Modifications to Base Data Views

Displaying an Error Requiring to Enter Entity Data

Exporting Records via Screen-Based API

Exporting Records via REST Contract-Based API

To communicate with the REST Contract-Based API of Acumatica ERP your client application must always perform the following 3 steps:

  1. log into Acumatica ERP instance and get cookie with user session information

  2. interact with one of Contract-Based API endpoints available on Acumatica ERP instance

  3. log out from Acumatica ERP to close user session

All samples provided in this topic were built with the Default endpoint, always deployed as part of the standard Acumatica ERP installation process. On the Web Service Endpoints screen (SM.20.70.60) you can view the details of existing endpoints or configure your custom endpoints of the Acumatica ERP contract-based web services:

enter image description here

For your reference, below is implementation of the RestService class used in all samples above to interact with the Contract-Based web service of Acumatica ERP:

public class RestService : IDisposable
{
    private readonly HttpClient _httpClient;
    private readonly string _acumaticaBaseUrl;
    private readonly string _acumaticaEndpointUrl;

    public RestService(string acumaticaBaseUrl, string endpoint,
        string userName, string password,
        string company, string branch)
    {
        _acumaticaBaseUrl = acumaticaBaseUrl;
        _acumaticaEndpointUrl = _acumaticaBaseUrl + "/entity/" + endpoint + "/";
        _httpClient = new HttpClient(
            new HttpClientHandler
            {
                UseCookies = true,
                CookieContainer = new CookieContainer()
            })
        {
            BaseAddress = new Uri(_acumaticaEndpointUrl),
            DefaultRequestHeaders =
            {
                Accept = {MediaTypeWithQualityHeaderValue.Parse("text/json")}
            }
        };

        var str = new StringContent(
            new JavaScriptSerializer()
                .Serialize(
                    new
                    {
                        name = userName,
                        password = password,
                        company = company,
                        branch = branch
                    }),
                    Encoding.UTF8, "application/json");

        _httpClient.PostAsync(acumaticaBaseUrl + "/entity/auth/login", str)
            .Result.EnsureSuccessStatusCode();
    }

    void IDisposable.Dispose()
    {
        _httpClient.PostAsync(_acumaticaBaseUrl + "/entity/auth/logout",
            new ByteArrayContent(new byte[0])).Wait();
        _httpClient.Dispose();
    }

    public string GetList(string entityName)
    {
        var res = _httpClient.GetAsync(_acumaticaEndpointUrl + entityName)
            .Result.EnsureSuccessStatusCode();

        return res.Content.ReadAsStringAsync().Result;
    }

    public string GetList(string entityName, string parameters)
    {
        var res = _httpClient.GetAsync(_acumaticaEndpointUrl + entityName + "?" + parameters)
            .Result.EnsureSuccessStatusCode();

        return res.Content.ReadAsStringAsync().Result;
    }
}

Extending List of Entities Supported by Tasks, Events and Activities

Modifying Items in a Dropdown List

Conditionally Hiding Tabs

Using Customization Plug-In to Make Changes in Multiple Companies

Changing Size of Selector Drop-Down Window

Replacing Images on the Login Page

Acumatica BQL Reference

Significant API Changes Between Versions

Customization Mechanisms

User Interface Techniques

Publishing skipped already applied customization content

Modifications to Contact and Address Info through Code

Downloading Files Attached to a Detail Entity Using Contract-Based API

The code snippet above was created using the Json.NET framework (Newtonsoft.Json.dll).

To obtain HTTP cookie header from a SOAP response, add a reference to the .Net framework System.ServiceModel and System.ServiceModel.Web assemblies and the following 2 using directives in your code file:

using System.ServiceModel;
using System.ServiceModel.Web;

Filtering with multiple value with only one selector

Creating Date and Time Fields in Acumatica