UnpublishAllPackages() Method
You use the UnpublishAllPackages() method to cancel customization of an MYOB Acumatica instance.
Syntax
public void UnpublishAllPackages()
Example
The following code logs in to an MYOB Acumatica instance and cancels all customization projects that is currently applied to the instance.
var webserviceurl = "http://localhost/AcumaticaInstance/api/ServiceGate.asmx";
var username = "admin";
var password = "123";
var client = new ServiceGate.ServiceGate
{
Url = webserviceurl,
CookieContainer = new CookieContainer(),
Timeout = (int) TimeSpan.FromMinutes(5).TotalMilliseconds
};
var loginResult = client.Login(username, password);
if (loginResult.Code == ErrorCode.OK)
{
client.UnpublishAllPackages();
}
Usage Notes
The method removes all customization changes from the file system, regardless of the tenants where the customization projects were published.