{"id":7715,"date":"2023-04-28T10:07:02","date_gmt":"2023-04-28T09:07:02","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=7715"},"modified":"2023-05-12T10:03:46","modified_gmt":"2023-05-12T09:03:46","slug":"uniconta-force-load-cache-reporting","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/uniconta-force-load-cache-reporting\/","title":{"rendered":"Uniconta Force Load Cache (Reporting)"},"content":{"rendered":"\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"csharp\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">\/\/ First, when using:\nClientHelper.GetRefClient(base.CompanyId, typeof(InvItem), _Item);\n\nvar companyId = api.CompanyId;\n\/\/ ensure all (created) items have the correct CompanyId set.\nvar order = new DebtorOrderClient() {\n        CompanyId = companyId\n    };\nvar line = new DebtorOrderLineClient() {\n        CompanyId = companyId,\n        Item = x.ArticleCode,\n        Qty = x.QuantityTotal,\n        Unit = invItem?.Unit,\n        Text = x.Description ?? invItem?.Name,\n        Warehouse = invItem?.Warehouse,\n        Location = invItem?.Location\n    };\n<\/pre><\/div>\n\n\n\n<p>To ensure the cache is available, load the cache via the company entity:<\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"csharp\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">\/\/ Force cache load\nvar companyId = api.CompanyId;\nvar company = Company.Get(companyId);\nvar cache = company.GetCache(typeof(InvItemClient), api);<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>To ensure the cache is available, load the cache via the company entity:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7715","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/7715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=7715"}],"version-history":[{"count":2,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/7715\/revisions"}],"predecessor-version":[{"id":7717,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/7715\/revisions\/7717"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=7715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=7715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=7715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}