Joins with PXRestrictor

Hi There, There is a chance that you wanted to use PXRestrictor, but there is no needed table to provide a validation. Please note that “BAccountClass” table is not defined in the querry from the PXSelector. Resultantly, the Where condition “rictorAttribute(typeof(Where<BAccountClass.IsInternal, Equal<True>” will not work and will give you an SQL Interpretatino error. Further more, there is not way to add a Join to BAccountClass table from the PXRestrictor attribute, since this is not something supported by Acumatica framework yet. However, there is a relatively easy way to workaround this with subselect query from Where statement using the Exists<> BQL Command. This is not a perfect way from the performance… Read more

Feature Validation in Grid Lines

Hi There! As you may know, Acumatica has a pretty nice and easy way to create and validate if a certain feature is enabled. You can read about it here. However, that way works well only if you have to hide fields, columns, grids, forms. What if you want to hide some records from the grid based on the feature? Normally this is not a trivial task and requires a lot of code in the data view delegates and so on. And even you do all of these things, you won’t be able to use it in the Generic Injuries. I would like to suggest an alternative approach where we… Read more

Switch between Old and New Processing result UI

Hi All, You know that starting from Acumatica 2019r1 there is a new processing result window that shows more information about record processed and pending. However you should know that it is possible to control this behavior via graph code. There is a virtual property at PXGraph -> IsProcessing which identifies if this page should display processing result in the new format. And you can override this property in a processing graph to not display the Processing dialog box on the processing page. If the value is false, the progress and the result of the processing are displayed on the page toolbar. By default, the value is true (the Processing… Read more

Maximize Selector Drop-Down with JavaScript

Hi Everyone, Some time ago I had a question – is it possible to automatically maximize (expand) selector window when we opens it. Out of my research I know now that there is no settings for that in the selector configurations but this is very possible with Javascript. And following another example of Javascript in Acumatica I want to share this example with you. First thing we need to do is to add a Javascript control to Acumatica grid where you are planning to expand selector. Than we just add the Javascript method that finds the selector panel from passed parameters and calls it’s method to expand Now we need… Read more

Rename Acumatica Instance

Hi All, Once in a while everyone need to rename Acumatica instance to the better name. In this article I want to share with you 2 ways how you can do that Using Wizard Acumatica Configuration Wizard has a nice function to rename any of the installed instances. Renaming includes the Instance name and Virtual Directory Name. To do so: Open Wizard Go to “Perform Application Maintenance” Choose instance you want to rename Click “Instance Info” Use “Rename” links next to “Instance Name” or “Virtual Directory Name” Don’t forget to Save and close the window using OK button. Sql Server Database should be renamed manually, but wizard can help to… Read more

Where Acumatica name came from?

Hi All, Just a short interesting question “Why Acumatica is named Acumatica”? Actually it is combination of words Accounting (accou-) and Automatics (-matic). So we get “Accu-matic-a” 🙂 Last “A” is just for good sound. Also if you ever found wandering why PXGraph is named as Graph, than there is a reason – it is related to data structure inside. Using DataViews you define relation between database tables. These relations looks like a graph-structure as has a lot of direct and indirect references back and forth. So that is the reason.

Field Event Sequence

Hi All, As you may know from, Acumatica events are triggered in the specific sequence. But there is sequence not only for event types, events for different row and field will be triggered within a specific sequence too. Rows With rows it is a bit easy:Insert/Update happens in the sequence how it was triggered. If you update a value it will trigger an event sequence for specific cache that was updated. In case event updates other caches, that they will be triggered also as soon as cache.Update/Insert/Delete is called.Save/Delete happens for primary cache first as it is associated with the button, than it will call PXParent Attributes in the sequence… Read more

Page Refresh and Redirection

Hi All, As you know Acumatica page submits all data to the server though different callbacks. This is good for network performance, but brings some limitations – like redirection. Unfortunately it is not possible to use Response.Redirect() during the callbacks as browser script does not expect it and can’t properly react. To solve some of these issues Acumatica uses different exceptions (like PXRedirectRequiredException, PXReportRequiredException and so on). These Exceptions will be handled by base code (Callback Manager) and translated to text commands that will be handled in JavaScript. For instance, PXRedirectRequiredException(WindowMode.New, SuppressFramceset = false) will be translated to eRedirect3:+<SomeURL>. You can read more about this mechanism here. This code is… Read more

Flags in PXGraph

Hi All, A short but useful article today – PXGraph is a center of the whole business logic in Acumatica framework and can be triggered from different places: UI, Web Services API, Mobile, Import and so on. As a developer you sometimes need to know what is the context of the request you are processing right now, so you can adjust the business logic. For this purpose PXGraph has a set of flags that are automatically triggered during different operations. Here they are: graph.IsImport – flag will be automatically set when Import/Export engine is working. This will be true for Import/Export scenarios, Web Services, Copy/Paste action, Mobile. So almost all… Read more

Success Story in Acumatica

Original Post is located here: https://www.facebook.com/acumaticarussia/posts/323585055218750 If you ask me about my 12 years story in Acumatica, I would say it was the story of luck multiplied by hard work. Part 1: Moscow: Hiring It was all started right after bachelor’s degree at my university. I started to search for a job and a friend of mine recommended a company with name SW Soft. I went there on interview where Mike and Andrew gave me two tasks (we still give it to all new candidates). Later these guys became great mentors for me. One of the tasks I have completed only from the second attempt. I still remember my fillings… Read more

Remove Action Menu from Actions Drop-down

Hi All, Show example for you today – how to remove action from menu based on example of ChangeID function in CustomerMaint graph. Problem If you take VendorMaint and try to find who ChangeID is declared there you will be able to find following code: So you can see here that ChangeID button is added as a menu to the Action button. This works pretty well accordingly to example with adding sub-menu actions here. Now the question – what if we need to remove or hide this action? We can’t use automation steps as they cannot make button invisible. We cannot use PXUIFieldAttribute on ChangeID as this button is already… Read more

Open a Report in Acumatica

Hi All, Following a previous post about redirection architecture I want to show you an example of how can you use it to open a report. Here we need to use PXReportRequiredException, as it designed to open reports. But also we need to provide a report name and report parameters. Report Name is just a Screen ID that you can find in the sitemap Report Parameters is a Dictionary<string, string> that is basically a key-value pair. Key is a parameter name and value is a value. Parameter names are taken directly from the report. Here is the example code to create a button for report. I get this code from… Read more

Redirection and Dialog in Acumatica

Hi All, In the web application is mostly one-way communication – Browser send request, server receives it and response. This means If we don’t use a special technologies like a Web Sockets, that there is no way for server to communicate tho the browser Also if we don’t really know where is the user and if he still will interact with us. So here we have 2 major questions: How to return control to user when server logic needs it? Prevent data further data modifications? For example if dialog is required when user clicked save. In Acumatica we have solved these problems with exceptions. When we need to rise a… Read more

“This Form Cannot be Automated” – Investigation

Hi Everyone, I think everyone have seen this error message at leas once. This error message can appear as on customized Acumatica screens as on standard screens as well. But what is the reason of this error and what to do with it? Explanations This error is related to screen layout. When Acumatica need to perform any of the screen automations (like, scheduling, notifications, import/export data, web-services API calls, automation steps and so on), Acumatica parse screen layout and generates in-memory screen structure based on ASPX markup. This is needed to identify how many controls, forms, grids are located on the screen, what type of controls and how can they… Read more

Grids Master-Detail Relationship

Hi Everyone, Sometimes you need to have a screen with 2 grids that depend on each other. When you change line in one grid, it should refresh records in another. In this case you need to establish Grids Master-Detail relationship. In general master-detail relationship for grids is almost the same as for form-grid. You can read more about it in T200 Framework Fundamentials Training Guide, Example 2.2, Setting Up the Master-Detail Relationship Between DataAs a summary from the training, we need to do 3 points Put PXDBDefault attributes in child DAC to auto-initialize dependent keys. Put PXParent attribute in child DAC to allow cascade deletion and few other functions. Use… Read more

Common Issues in Addon Solution Architecture

Hi Everyone, During past time, I used to review several ISV solutions and have collected some common issues that may significantly complicate development and support. Unsplittable Code Problem – Some ISV Solutions code and Acumatica code are very heavily connected and looks like “yin yang”. That means that there is no clear boarder between Acumatica and ISV solution that gives hard time to understand where exactly is the problem – Acumatica or Customization. And this leads to even bigger problem – unsplittable code makes impossible for ISV team to investigate bugs and issues – are they related to Acumatica or Custom code. In the end it makes impossible to escalate… Read more

Access Restrictions by Workgroups

Hi All, Today I want to share with you a quite advanced customization that can significantly enhance your data security. Lets start with business task first: Customer want to limit visibility of certain documents and entities between different users and group of users: Users should see the entity or document if he is creator, owner or belongs to a workgroup that can see the document. If users see the entity or document than all his managers should also see the same document. Users who don’t belong to assigned workgroups should not see the document or entity. It is possible that documents or entities are assigned to multiple workgroups simultaneously For… Read more

Files Sync Providers

Hi All, Acumatica architecture is very extensible and many functions can be extended just with new class of specific interface/base class.Import Data Providers, Dashboards, Credit Card Processing, Bank Statement Import and so on. Most of them already described in different sources. However today I want to show you how to create a custom File Sync Provider. The list of providers that you can see in the Synchronization Types is actually dynamic. That means you can add there more functions without changing base code of Acumatica. To add a new File Sync Provider you need to to 2 things: Create a Provider class that can handle files Export/Import Extend Combo-box to… Read more

Sales Basics For Developers

Hi All, Here I want to share with you some information and my observations on how ERP Sales works in our business. As developers or consultants we are not often involved in sales processes and not often understand how company earns money. However I believe that is an essential knowledge for every single employee as only trough understanding of company targets we can properly define priorities. This is continuation of my previous article – Accounting Basics for Developers. Nature of Sales Sales in general is very chaotic thing that may be affected by so many different aspects: personal preferences (like/dislike more), knowledge (know how to use), personal relationship (trust someone… Read more