QuickBooks Integrator 2020 .NET Edition

Questions / Feedback?

GetLastError Event

Fires when QuickBooks Web Connector checks for error information.

Syntax

public event OnGetLastErrorHandler OnGetLastError;

public delegate void OnGetLastErrorHandler(object sender, QbwcserverGetLastErrorEventArgs e);

public class QbwcserverGetLastErrorEventArgs : EventArgs {
  public string SessionTicket { get; }
  public bool Pause { get; set; }
  public bool InteractiveMode { get; set; }
  public string ErrorMessage { get; set; }
}
Public Event OnGetLastError As OnGetLastErrorHandler

Public Delegate Sub OnGetLastErrorHandler(sender As Object, e As QbwcserverGetLastErrorEventArgs)

Public Class QbwcserverGetLastErrorEventArgs Inherits EventArgs
  Public ReadOnly Property SessionTicket As String
  Public Property Pause As Boolean
  Public Property InteractiveMode As Boolean
  Public Property ErrorMessage As String
End Class

Remarks

This event allows you to report an error to QuickBooks Web Connector. It will be fired whenever QuickBooks Web Connector detects an error condition and asks your application for details. The parameters are as follows:

SessionTicket identifies the session.

Pause may be set to True to introduce a brief delay, after which QuickBooks Web Connector will retry the previous operation. For instance, the following sequence of events may occur:

  • QuickBooks Web Connector makes a call and SendRequest fires.
  • You set the Request parameter inside SendRequest to empty string.
  • QuickBooks Web Connector determines the empty request as an error and makes a call which fires the GetLastError event.
  • You set the Pause parameter inside this event to True.
  • QuickBooks Web Connector reads the response and waits 5 seconds.
  • QuickBooks Web Connector retries the previous operation and makes a call which fires SendRequest again.

InteractiveMode may be set to request interactive mode. When set to True the QuickBooks Web Connector will prompt the user to accept an interactive session. If the user agrees, QuickBooks Web Connector will make a call and the GetInteractiveURL event will fire. If the user declines, QuickBooks Web Connector will report this and the InteractiveRejected event will fire.

ErrorMessage may be set to any string which will be reported to the QuickBooks Web Connector.

Copyright (c) 2021 /n software inc. - All rights reserved.
QuickBooks Integrator 2020 .NET Edition - Version 20.0 [Build 7941]