Difference between Acumatica ERP and Framework

Hi All, Previously I had quite a lot of questions about how to integrate development done on Acumatica Framework with Acumatica ERP. Usually them main reason of that question is misunderstanding of what is Acumatica Framework. Acumatica Framework (what you can download as separate installer from portal) is designed to develop product that is completely separated from Acumatica ERP. That is why there are less functions and no code integration with ERP. In case you are see benefits of using functions form Acumatica ERP (like segmented keys, numbering, accounts, subaccounts, customers/vendors, inventory items), it would be much better to start development on Acumatica ERP itself from the beginning, and do… Read more

DACs Inheritance and Caches

Hi All Want to speak today about DACs inheritance in Acumatica and some issues that it cause to development. As you know C#/.NET as OOP-oriented framework support inheritance of objects, but when in comes SQL and Database structure than there is no inheritance between tables. As a bonus I will explain why we need BAccount and BAccount2 DACs and what is the difference. Inheritance In Acumatica we want to leverage benefits of OOP to simplify references between objects, minimize database size required, ease of reporting and so on. As a result of that we have designed system in such way to support it: You can have parent DAC public class BAccount : IBqlTable { …… Read more

Multiple DataViews on the same Form

Hi All, If you didn’t know previously, in Acumatica has introduced new syntax of defining DataViews/Fields. Previously you have to create a new Form, assign DataView to form and than add there fields. But now you can use following construction: “DataMember.DataField” right in the DataField property. <px:PXSelector DataField=”BranchID” /> <px:PXCheckBox DataField=”DefLocation.IsRemitContactSameAsMain” /> <px:PXTextEdit DataField=”RemitAddress.AddressLine1″ /> <px:PXTextEdit DataField=”RemitAddress.AddressLine2″ /> Also, a DataMember can be specified as an attribute of a PXPanel, and it will be inherited by all internal controls. <px:PXPanel RenderStyle=”Simple” DataMember=”RemitContact” >     <px:PXMaskEdit ID=”edFax” runat=”server” DataField=”Fax” />     <px:PXMaskEdit ID=”edPhone1″ runat=”server” DataField=”Phone1″ /> </px:PXPanel> Have a nice development!

Database Mapped vs Virtual Fields

Hi All, Today want to share with you how Database vs Virtual fields are working in Acumatica. You may notice that some of the fields are linked to DB, some of them not.The difference is in the Attributes are used on it – PXDB<Type>Attribute is mapped on database field, PX<Type>Attribute is not. So from user standpoint it is just prefix “DB” or “”. In Acumatica there are many fields are mapped to database and most of them have a clone, that is not mapped. Here you can see list of most common attributes. Description Database Mapped Field Virtual Field String Value PXDBStringAttribute PXStringAttribute Byte Value PXDBByteAttribute PXByteAttribute Short Value PXDBShortAttribute… Read more

Redirecting to External Page from Button

Hi There, Want to share with you my experience with working with redirects from Acumatica. You may know that due to security issues and stability of software, redirect to external web site in the iFrame is forbidden in Acumatica. So every time when you use “PXRedirectToUrlException” for url like “http://acumatica.com” system will open url in separate window/tab. That is OK in mane cases, but sometimes you really need that functionality. One way to solve that issue is well described in a separate article – Redirect on Page Load But that one is applicable only if you want to have a menu item in Acumatica SiteMap. If you want to redirect… Read more

Actions and Primary View

Hi There, Today we are going to speak about Actions in Acumatica, as well known as Buttons. When you creating a button you basically just need to write a simple code snippet like here: #region Event Handlers public PXAction<PX.Objects.GL.Batch> MyButton;   [PXButton(CommitChanges = true)] [PXUIField(DisplayName = “My Button”)] protected void myButton() { } #endregion As soon as you add this button as extension and publish it, you will see button appeared on the screen. But from platform standpoint there is much more than button handler, let check how does it work: Action Data View – “public PXAction<Batch> MyButton;” PXAction is special version of Data View in Acumatica, that defines action name, as well as button handler name. But you may see… Read more

Sending Notification Template from Custom Code

Hi There, Today want to share with you how to send emails from Acumatica custom code based on Notification Templates. User scenario is very simple – lets assume we want to send an email from Acumatica that informs about contract, quote expiration or something else. But in the same time we want to keep activity linked to our document for the future reference. Basically, if we do that manually we need to create new Email activity, fill all details there, attach to entity and send it than, The obvious way to automate it is usage of Notification Templates. Notification templates are special type of emails, that can be combined dynamically… Read more

Conditionally Activate Extensions

Hi All, Today I want to share with the way how you can enable and disable extensions dynamically. You know that when you have published extension as a DLL or a Code file it will be automatically discovered by Acumatica Framework and used. However there is a hidden way to stop Acumatica from usage of that extension. Do do that you just need add static method IsActive() to your extension. public class GL_Batch_Ext : PXCacheExtension<PX.Objects.GL.Batch>   {           public static bool IsActive()       {         return false;       }   } Acumatica will automatically call that method by signature (you need to have correct name, public, static and return bool) and if it returns… Read more

Useful Web.Config Parameters

Hi All, Acumatica as standard ASP.NET application stores some configurations in web.config file. Some parameters can be really useful for users and developers. In this article i want to share with you parameters that really can help you. AutomationDebug (Default false) – An indicator of whether an information about the current automation step (state of a form of Acumatica ERP) is displayed on the form. If you set the value of the key to true, the text box with the current automation state is displayed on the Info area of a form of Acumatica ERP. Very useful parameter if you changing automation steps CheckCustomizationCompatibility (default True) – If the key… Read more

Append and Replace of DACs Attributes

Hi Everyone. Today want so share with you some ideas on how you can append, replace or merge attributes on standard Acumatica’s data access classes. Acumatica Framework attributes are used to add common business logic to the application components. Attributes implement business logic by subscribing to events. Each attribute class directly or indirectly derives from the PXEventSubscriberAttribute class. B Most attributes are added to data access class (DAC) field declarations. There are also attributes that are placed on a DAC declaration, view declarations in a business logic controller (BLC), and the BLC declaration itself. In general there are 4 places where you can define attributes: DAC attributes DAC fields. You… Read more

Client Events using JavaScript

Hi All, Today I want to share with you one way how you can add some client validations/calculation using JavaScript right in the browser with no accessing server data. In general i would suggest you to not do any complex calculations on client side and always use server for all data manipulations. However in some specific situations this approach may save a lot of processing time because client events may do calculations right in the browser. Also note that client logic will be available only for browser users and will not be triggered from web services API and Mobile application. The scenario that i want to do is quite simple… Read more

PXUIEnabled and PXUIRequired Attributes

Hi All, If you developing something on Acumatica xRP platform you know that changing of the UI fields visibility should be done through PXUIFieldAttribute on the RowSelected event. This works perfect on small screens with limited number of controls. But most of ERP screens are not really small. So most probably you already saw such types of code on the RowSelected in SOOrderEntry graph and many others. Not nice and really hard to support. Luckily now we have a different way to do it: PXUIEnabled – based on provided BQL conditions can automatically change UIFieldAttribute Enabled property. PXUIRequired – based on provided BQL condition can automatically change PXDefaultAttribute PersistingCheck property.… Read more

Getting started with Acumatica xRP Platform

Hi All, Sometimes I get a questions like this: How to start development with Acumatica xRP platform? How complex is it? Where we can get some guidance? So here I want to summarize all thoughts that I have about it. I would select these steps that i would recommend you to do: Ensure Pre-Requisites Get Acumatica Prepare Development Environment Learn Acumatica xRP Platform Do Development Communicate & Support Lets go though each of these steps in details under the cut. Knowledge Pre-Requisites To be able to do development you need to have a knowledge of technology and programming language used in Acumatica. This knowledge outside of Acumatica training course: Proficiency… Read more

Most Popular Acumatica DAC Attributes

Hi All, Today I want to share with you some statistics on Acumatica xRP Attributes usage across Acumatica ERP Business modules. The goal of this article is to show you a full list of attributes that you may use for customization and also give you a chance to learn some new useful attributes, that you have not seen before. This data was collected from PX.Objects.dll of Acumatica 6 and may be different from version to version. All attributes are sorted by the usage frequency, highlighted by value and grouped by colours: Fields attributes Selectors and aggregate attributes Business logic Others In the brackets you can find approximate value of how… Read more

Acumatica Test Framework

Hi All, Acumatica has a strong focus on the Platform and Development tools, that can help all our clients and partners to provide better product faster and with lower cost. One of the nice and free tool that Acumatica provides as part of platform is Acumatica Test Framework. Acumatica test Framework is a set of tools and libraries that can be used for unattended black-box testing of any product or customization that is based on Acumatica Platform right in your favorite browser. For interacting with UI controls and components Acumatica Test Framework uses Selenium Web Driver. You can read more about Selenium here. The high level diagram of Test Framework… Read more

Replacing Cache with custom class

Hi All, Today i want to share with you a good trick how you can override original PXCache object. Why you may need it? To replace base cache logic, that should not be executed in some cases. Forbid cache to read data for database in case of virtual DAC Inject required logic to the standard workflow Do not clear cache data on graph clearing Access protected method And many other things. As you may know, that when you (or system) create a new instance of a graph, it will automatically instantiate all caches for each data views that are declared. Unfortunately, because this is unattended process it is almost impossible… Read more

Generate Grid Columns Dynamically

Hi All, Today I want to show you an example how you can generate grid columns dynamically. Sometime it is really important for dynamic inquiry report, where you want to show data that may be changed due to some other configurations. To add columns dynamically you should follow this plan: Create a separate method that will generate columns. Call method create above from the graph constructor. Please not that if you put method into any event you need to make sure that you generation columns only once. Also you logic assume that columns may be changes if user select some other values on the same screen you need to make… Read more

Custom Selector Attribute

Hi All, Today I want to discuss with you a ways to define selectors and data for them. Usually you define selectors like this: [PXSelector(typeof(Search<Carrier.carrierID>))] In this case system will automatically select value from database Carrier table and show list of Carrier IDs to user. In this case you have 2 potential problems: you should have a database table, otherwise you will see an error. There is no way to dynamically change or adjust data that is returned to user You can limited configurations to control selector behavior. To solve these problem Acumatica has a Custom Selector attributes: public class CustomerPriceClassAttribute : PXCustomSelectorAttribute {     public CustomerPriceClassAttribute()         : base(typeof(ARPriceClass.priceClassID))    … Read more

Restriction Groups Architecture

Hi All, Today I want to share with you some technology information about how Acumatica Restriction groups works inside Acumatica. For each group system assign one byte in the GroupMask Database column: Group 1 – 0x8000 = 1000 0000 0000 0000 Group 2 – 0x4000 = 0100 0000 0000 0000 Group 3 – 0x2000 = 0010 0000 0000 0000 Group 4 – 0x1000 = 0001 0000 0000 0000 Group 5 – 0x0800 = 0000 1000 0000 0000 Group 6 – 0x0400 = 0000 0100 0000 0000 ….. and so on Here you can see that Acumatica numbers groups using bytes. Each group – one unique byte. To maintain correct security… Read more

PXViewDetailsButton Attribute for better navigation

Hi All, Today want to share with you one new way how you can define navigation in Acumatica version 5.3. From T200 Acumatica Framework Fundamentalist you may know that if you want to map action to any cell in the grid and show it as link you need to define LineCommand: <px:PXGridColumn DataField=”ProductID” Width=”140px” LinkCommand=”ViewProduct” /> But to be able to use it, you should define action, action handler, throw appropriate exception, hide it in data source and so on. Quite log and boring. In Acumatica 5.3 there is a PXViewDetailsButtonAttribute that can do all these things for you. [PXViewDetailsButton(typeof(Contact),typeof(Select<Contact,     Where<Contact.contactID, Equal<Current<CROpportunity.contactID>>>>))] [PXViewDetailsButton(typeof(BAccount),typeof(Select<BAccount,     Where<BAccount.ccbAccountID, Equal<Current<CROpportunity.customerID>>>>))] public PXSelectReadonly<CROpportunit> Opportunities; This attribute will… Read more