static void DeleteCompanyAccountsByXPP(Args _args)
{
DataArea dataArea;
dataAreaId dataAreaId = 'USMF';
container virtualCompanies;
boolean validateDelete;
;
select dataArea where dataArea.id == dataAreaId;
if(dataArea)
{
validateDelete = xDataArea::validateDelete(dataArea);
if(validateDelete)
{
//Find virtual companies which are only assoicated with this
//deleted real company
virtualCompanies=xDataArea::findVirtualCompaniesAffected(dataAreaId);
if (xDataArea::delete(dataAreaId))
{
xDataArea::resyncOnRealCompChange(virtualCompanies);
}
else
{
// this.mark(o);
xDataArea::reloadTableCollections();
}
}
}
else
{
throw error(strfmt("Invalid company accounts %1",dataAreaId));
}
info("done");
}
{
DataArea dataArea;
dataAreaId dataAreaId = 'USMF';
container virtualCompanies;
boolean validateDelete;
;
select dataArea where dataArea.id == dataAreaId;
if(dataArea)
{
validateDelete = xDataArea::validateDelete(dataArea);
if(validateDelete)
{
//Find virtual companies which are only assoicated with this
//deleted real company
virtualCompanies=xDataArea::findVirtualCompaniesAffected(dataAreaId);
if (xDataArea::delete(dataAreaId))
{
xDataArea::resyncOnRealCompChange(virtualCompanies);
}
else
{
// this.mark(o);
xDataArea::reloadTableCollections();
}
}
}
else
{
throw error(strfmt("Invalid company accounts %1",dataAreaId));
}
info("done");
}
No comments:
Post a Comment