We\'ve got code to use the Acumatica Web Services inside of an Acumatica BLC, because we want to save data to a different company. I was made aware of another way to do thi
To save data to a different company, you should execute your code within PXLoginScope. In the sample below new Stock Item is saved under the NewCompany
tenant:
using (PXLoginScope ls = new PXLoginScope("admin@NewCompany"))
{
InventoryItemMaint maint = PXGraph.CreateInstance<InventoryItemMaint>();
InventoryItem item = new InventoryItem();
item.InventoryCD = "TEST";
item = maint.Item.Insert(item);
item.ItemClassID = "ALLOTHER";
maint.Item.Update(item);
maint.Actions.PressSave();
}