// First, when using: ClientHelper.GetRefClient(base.CompanyId, typeof(InvItem), _Item); var companyId = api.CompanyId; // ensure all (created) items have the correct CompanyId set. var order = new DebtorOrderClient() { CompanyId = companyId }; var line = new DebtorOrderLineClient() { CompanyId = companyId, Item = x.ArticleCode, Qty = x.QuantityTotal, Unit = invItem?.Unit, Text = x.Description ?? invItem?.Name, Warehouse = invItem?.Warehouse, Location = invItem?.Location };
To ensure the cache is available, load the cache via the company entity:
// Force cache load var companyId = api.CompanyId; var company = Company.Get(companyId); var cache = company.GetCache(typeof(InvItemClient), api);
771500cookie-checkUniconta Force Load Cache (Reporting)