Hide Action from Datasource

Hi All, When you new create action in the PXGraphExtensions, it is automatically getting visible in in the data-source actions bar, even if you have not customized ASPX. public class JournalEntry_Extension:PXGraphExtension<JournalEntry> {     public PXAction<PX.Objects.GL.Batch> NewAction;       [PXButton(CommitChanges = true)]     [PXUIField(DisplayName = “New Action”)]     protected void newAction()     {     } } It looks like here: But if you want to hide that button, it is very easy to do it with Customization Browser. Just drag and drop button to the data-source in page editor: Than just set the Name to your action name and Visible to false. That is all. Now Action is not visible anymore. Have a nice development!

Customization and Source Control

Hi All, I’m sure you know that Acumatica customization project is just a big XML file that has some links on external files. You can easily export ZIP archive with all linked files and store it on the file system. Unfortunately is not really good for tracking changes. But do you know that Acumatica has very easy-to-use integration with source control where you can export project as set of text files? Let me show you how to use it: As I said customization project is big zip file, but it can be split by items, that you can see using File -Edit Project Items menu: All of these items we… Read more

Override Static Method

Hi All, Unfortunately sometimes during customization you may need to override some logic in static methods and that is really bad task, as it requires to copy a lot of code. Here I will show you few examples that can give you idea how you can fix it. In general there is no way to really override static method, the only one way how you can replace it’s logic is just define a new one and replace all places where it is called. 3 different scenarios will be based on Acumatica Fixed Assets module: Not so good – static method on event AssetMaint.LiveUpdateMaskedSubs(PXGraph graph, PXCache facache, FALocationHistory lochist); Bad –… Read more

Multi-Company Reports

Hi All, Today I want to share with you a way how you can print multi-company (multi-tenancy) reports. You know that Acumatica tenants are completely separated and there is no way to make a report or generic inquiry for multiple tenants. So first of all want to share with you the technical details – Acumatica stores all tenants in one database, but separate it by CompanyID column, that is a part of primary key. You can read more about it here. Acumatica Framework automatically detects CompanyID column in the table and adds “WHERE CompanyID = {Something}” to every query. Unfortunately you cannot change anything here. But good thing is –… Read more

Dynamically 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

Approval Workflow Customization

Hi Everyone, Today I want to share with you one important point about customization of automation approval workflow. Firs of all please read this article on Stack Overflow to understand how Acumatica Approval works. But here I would take Purchase Orders screen as example, because there we already have automation workflow configured. In the article below, you may notices that all approval logic is encapsulated into the special Data View – EPApprovalAutomation. On the Purchase Orders form it is designed like this: [PXViewName(Messages.Approval)] public EPApprovalAutomation<POOrder, POOrder.approved, POOrder.rejected, POOrder.hold, POSetupApproval> Approval; EPApprovalAutomation is just a class with multiple virtual methods that you can override and customize. So we can create our own approval… Read more