To Use the Screen-Based API Wrapper

The screen-based SOAP API depends on the user interface of MYOB Acumatica forms. That is, each generated WSDL description of this API includes the API elements that correspond to the current names of UI elements of the system. Therefore, if any changes have been made to the user interface of the system after the WSDL file was generated, the WSDL description will not include these changes, and the client application that uses this WSDL will fail when it works with the system.

To prevent application failures and omit the regeneration of the WSDL description for each change of the user interface of the system, you can use the screen-based API wrapper, as described in this topic. You can find more information on the screen-based API wrapper in Screen-Based API Wrapper.

To Use the Screen-Based Web Services API Wrapper in a Client Application

  1. Add to your project a reference to PX.Soap.dll.
    Note: The PX.Soap.dll file is installed automatically during MYOB Acumatica installation. You can find this file in the ScreenBasedAPIWrapper folder of your MYOB Acumatica installation folder.
  2. Use the Helper.GetSchema() method from the PX.Soap library in the code of your application instead of the corresponding Screen.GetSchema() method to obtain the schema of each form. For example, the following code retrieves the schema of the Customers (AR303000) form by using the screen-based API wrapper.
    Screen context = new Screen();
    context.CookieContainer = new System.Net.CookieContainer();
    context.Url = Properties.Settings.Default.MyStoreIntegration_MyStore_Screen;
    context.Login
    (
      Properties.Settings.Default.Login, 
      Properties.Settings.Default.Password
    );
    
    AR303000Content custSchema = 
      PX.Soap.Helper.GetSchema<AR303000Content>(context);
  3. Work with the retrieved Content object by using the standard screen-based web services API methods.