Dynamic Drop-Down Control

Hi Everyone, Usually Acumatica Drop-Down controls have fixed lists of values. Of course you can use PXStringListAttribute.SetList<…>(…) method do change list of values dynamically, but how to make it more handy. The way I recommend you is to create an attribute that can encapsulate all the field related logic, so to use it you can just put the attribute on the proper place. So the plan: Create an attribute that will be inherited from PXStringList and provide the values Create IPrefetchable class that can be automatically load all possible list from DB and cache it. In the same time Acumatica will auto-reset when the linked table is changed. This is… Read more

Monitor Online Users

Hi All, Web technologies work the way where server know almost nothing about where is browser and what is user doing there. Is it active? Is it closed? It is online? Is computer sleeping? We don’t know if there browser does not inform us. Just for example – if you lost internet connection, should we treat this as online or inactive? In Acumatica Online/Offline is just a flag in users table. If users logs in, Acumatica rises this flag, if users is not active for some time, Acumatica clears this flag. This flag is automatically managed by Acumatica but in some cases it may be not in the consistency with… Read more

Average rating:

Send Documents to Printers

Hi All, There is an nice function in Acumatica 2018R1 – Device Hub. This service can be installed on any machine where printer is configured/available and automatically pull Acumatica for documents need to be printed. There are a lot of screens who uses this function in the standard Acumatica already, but today I want to give you a quick look on how you can write your custom code and send request to printers. Device Hub First of All device hub should be installed on your computer, connected to Acumatica and configured with Available printers. Printers also should be Configured in Acumatica. Customization Now we can write a bit of code.… Read more

In-Screen Popup Panels with iFrame

Hi Everyone, Most probably you have seen the function in Acumatica where you can open a new screen in a iframe on top of the existing screen without navigation. This approach has some benifits and disadvantages. Have inplace pupup helps to have less redirection and less windows, but in the same time it blocks the previous page and you cant modify/see background untill you close the popup. Choose the way you use wisely based on the requiranments and design you have. How to call inline popup? public PXAction<SOOrder> createPrepayment; [PXUIField(DisplayName = “Create Prepayment”, MapViewRights = PXCacheRights.Select, MapEnableRights = PXCacheRights.Update)] [PXButton(ImageKey = PX.Web.UI.Sprite.Main.AddNew)] protected virtual void CreatePrepayment() { ARPaymentEntry target =… Read more

Selecting data though Acumatica PXSelectorAttribute

Hi everyone, Today, I would like to share with you small tip to work with PXSelectorAttribute base on my experiences. Here is the story, let me image that you have the DAC and you want to add more information which is just supporting information and you dont want to save it. Please take a look on my DAC bellow. And now I would like to get the value of Default Price to display after I choose the Inventory Item. I will create code in the in the FieldUpdatedEvent like bellow In the conclusion, depends on your scenario you can use PXSelectorAttribute to get data from the cache. It would be… Read more

Automate Inter-Company Transactions – Architecture

Hi All, I have this question quite a lot in Asia, mostly because there you probably have a big company already if you explore the ERP options. Many medium/big companies in Asia have multiple locations, multiple offices, multiple legal entities in multiple countries. This comes to the point where you have to do some inter-company transactions that affects multiple companies. Inter-Company Transaction Inter-company accounting is the process of recording financial transactions between different legal entities within the same parent company You can classify inter-company transactions in 2 types: One transaction that hits multiple companies. For example when you pay rent from one company to multiple others. This transactions can be… Read more

Average rating:

Replenishment In Acumatica

Hi Everyone, Today I want to briefly explain a replenishment functionality in Acumatica. Overview Acumatica has designed replenishment feature based on most common requirements of SMB companies, however it is extended with advanced algorithms of automatic calculation replenishment parameters based on seasonality or historical transactions. In the same time you need to understand that Acumatica replenishment may not support some powerful replenishment features like advanced demand forecasting based on future SO/PO orders or other forecasting methods. In case of such requirements you can use full power of Acumatica xRP platform flexibility and customizability and you can and there other required features features. Acumatica replenishment is split into the two steps:… Read more

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

Average rating:

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