Select Multiple Documents into One Grid

Hi Everyone, In some situations you may want to show different unconnected documents inside one grid. Just for example you want to create Customer Overview screen and show all Invoices, Payments and Sales Orders together in one place. Join tables together is not the best approach, as you will have to add different columns with same names for fields from different tables. Better Approach is select them independently in Data View delegate and merge them into one virtual DAC. So plan is the following: Create a new Virtual DAC that will represent any document in the system. Please note that this DAC should have a Key that should unique even… Read more

Order of Tenants On Login Screen.

Hi Everyone. You may notice sometimes that order of tenants on logins screen might be broken like on this screenshot. That usually happens because the order of companies is broken in the database (where Acumatica stores it). On this screens you can see select of data from Companies table and you see mess in “Sequence” column. Why it can happened? The most common case is snapshot restoration. When you create a snapshot it stores the position of the company to correctly restore it if you need. But if you restore the same snapshot in the different company you may have a situation that 2 companies have the same Sequence number.… Read more

Totals Calculation for Inquiry

Hi Everyone, Today want to give you an idea of better architecture for inquiry with some aggregated calculations. Problem Statenment Let assume that you have an inquiry when you need to calculate totals together on the filter together with printing details like described here: Than how can you do that? One of the obvious way may be to create a dataview and iterate thought ever record to calculate total: public PXFilter<InquiryFilter> Filter; public PXSelect<Batch> Records; public IEnumerable records() { decimal docsTotal = 0m; foreach(Batch row in Records.Select()) { docsTotal += res.ControlTotal; yield return row; } //… } However it is not really good idea to iterate thought all records if you need to get a total of records selected, as you have to ignore paging… Read more

Context Parameters

Hi Everyone, In this topic I want to cover another architecture pattern we have in Acumatica – Usage of context related parameters. Problem Statement Within the event model it is not easy to pass parameters into the other child or related events. There is a way with local variables how it is shown in T300 Training Guide and Override Release Action Lesson. However it is a really not nice approach if events happens in different objects like here: public class SomeGraph : PXGraph<SomeGraph> { public void CreateBatch() { bool needValidate = true; //Create Batch } } public class JournalEntry : PXGraph<JournalEntry> { public void DAC_RowUpdated(PXCache cache, PXRowUpdatedEventArgs) { if (needValidate) { … } } } Solution In Acumatica we use an approach that we call Scopes. Scope is a class that set… Read more

Page Number on Acumatica Grid

Recently I got a question on the Platform Getting Started article – how to show page number, total page number on the Acumatica page.
Here in this article I would like to answer this question with some details.

Loops in Notification Templates

Hi Everone, There is a nice functionality in Acumatica that allows you to print details of the document inside the notification template. Together with other Data Fields, now you can put additional constructions like Loops (or for-each loops) <foreach view=”Products”> ((Products.InventoryID)) – ((Products.Quantity)) – ((Products.CuryExtPrice)) <br> </foreach> Here you can find following important elements: ((Products.InventoryID)) – is link to the data view and field. You can use designer to insert fields like this using button “Insert” -> “Data Field” <foreach> – here it is the reserved word for the beginning of the loop view=”Products” – this is a view name that is used to get data from database. You can… Read more

Generic Events Declaration

Hi Everyone, Starting from Acumatica 2017 R2 you may notice a different events declaration. We call in generic events or new events declaration. Here you can see an example for row and : protected virtual void _(Events.FieldUpdated<DAC, DAC.field> e) {} protected virtual void _(Events.FieldDefaulting<DAC, DAC.field> e) {} protected virtual void _(Events.RowUpdated e) {} protected virtual void _(Events.RowSelected e) {} protected void _(Events.CacheAttached e) {} From the functional side there is not difference between old and new events declarations. However with generic events you have 2 main benifits: No more mistakes in names of DACs or Fields. As you rerefence it by tipe whong name won’t be even compiled. Don’t need to cast DACs anymore from e.Row anymore. It will have a typeinside. PXCache cache = e.Cache; DAC row = e.Row; However there are a couple of… Read more

Team Development – Process and Responsibilities

Hi Everyone, Today want to give you one more view on the development process in Acumatica. When you have a team you have a different types of people with different skills. And everyone within a team should know their part of the whole process. In Acumatica every team has following members: Product Manager Developer Quality Asurance Engeneer Technical Writer They all and together participate in the feature delivery. And this diagram describes the best how feature workflow is organized between them: Now Let me describe it with details: Product Manager works with partners, clients and other information sources to prepare specification that will describe what feature should have from business… Read more

Acumatica MVP Program

Hi Everione, For someone who hasn’t notices that – Acumatica has very internstion badge for developers – MVP (Most Valuable Professionals). It can be used for promotional purposes by the company and by the individual MVP as well. This is designed to actively encourage greater contribution to our growing developer community and ecosystem. Please read more on Acumatica ADN Portal. And feel free to promote developers you know!

Continuous Integration with Acumatica Platform

Hi Everyone, A bit earlier on Acumatica Cloud Development Conference I had a Black Belt Development practices. As part of it I covered an automation tools Acumatica supports. In this article I want to extend this topic a bit with more examples and links. Automate Acumatica Wizard Installation Acumatica installation wizard is a standard MSI (Microsoft Installer) package that can be managed with standard windows tools. For example there is msiexec.exe tool that can do installation and de-installation from console. Here you can read more about msiexec parameters. With Acumatica you can use following command to install it: msiexec.exe /i /a /qn “AcumaticaERPInstall.msi” /i – installation command /qn – quiet… Read more

Custom field on CR Quote screen

Hi Everyone, If you try to add a custom field on CR Quotes in Acumatica 2018 R2 you may face very weird behavior – field is added, can be saved to database but as soon as you refresh screen or record valued disappears. The reason of this issues is PXProjection that is described in my separate article: PXProjection – SQL Views using BQL  This image show you how projection is defined in Acumatica CRM PXProjection uses 2 Data Access Classes for quotes: One class represents the table – PX.Objects.CR.Standalone.CRQuote Another represents view as combination of DACs in select – PX.Objects.CR.CRQuote And to correctly work, custom field needs to be added in… Read more