Toggle List as Entry Point

Hi All, List as entry point is very nice feature that allows yoг to see multiple documents together. However in some cases you may want to get document faster and eliminate unnecessary clicks. Luckily Acumatica gives your options to choose if you want to enable it or now. You can control this for Modern UI and Classic UI separately.  Just go to screen Lists as Entry Points (SM208500) In the end to make my life few seconds easier I have created a simple button that can toggle On and Off lists as entry point wherever I need them or not. View the code on Gist. Have a easy UI.

Auto-Numbering Customization

Hi All, In Acumatica PX.Objects.CS.AutoNumberAttribute is responsible for almost all auto-numbering. However sometimes you may want to have control on it. For example change sequence depend on conditions or add specific numbers related to vendor or customer. These things quite easy to do with customization. Here I’m going to show you 2 scenarios: How to change numbering sequence How to change new number Change Numbering Sequence on the fly. AutoNumber Attribute generates new number on RowPersisting event. As you may remember from T200 Development Training guide RowPersisting of graph will be executed prior to attributes, so we can control what Attributes will do. This is correct for all  *ing events… Read more

Extend Address Line length

Hi Everyone, Extending of field length in Acumatica is not a trivial task, so here I want to publish guidance on how I usually do that. To extend field we need to do 2 things: Extend allowed length in DAC attribute Extend length of Database Column Welcome under the cut for more details Extend Field in the DAC Here you need to find PXDBStringAttribute and redefine it. Allowed field length is passed in constructor so unfortunately you cannot easily change it with PXCustomizeBaseAttribute. In the end you have 2 ways: Redefine all attributes – [PXDBString(200, IsUnicode = true)] [PXUIField(DisplayName = “Address Line 1”, Visibility = PXUIVisibility.SelectorVisible)] [PXMassMergableField] Remove Specific attribute… Read more

Apply Customization to all Graphs

Hi All, Today want to share with you one tip how can you add customization to all graphs at once. You know that you can define graph extension with specific graph – PXGraphExtension<PX.Objects.GL.JournalEntry>. However, all graphs are inherited from one base class ether PXGraph<TGraph> or PXGraph<TGraph, TPrimaryView>. In that case PXGraph is normal class and can be used as standalone object. In terms of our customizations that means that we can create an extension for parent PXGraph and it will be used with any graph in the system automatically. Here we have an example how can you add a special setup to any graph in Acumatica. Please note that we… Read more

Custom Code on AP Invoice Release

Hi Everyone, What to share example with you how to call custom code during AP invoice release. In general process for AP is very similar to what is described in Acumatica T300 Customization Guide in Lesson 7: Customizing the Logic of the Release Action. Here you also need to find the best place where you can put your custom code and than write it there. Similar to guide above the best place is actually persisting method of APReleaseProcess graph. Lets check check how to investigate code first and when write a logic. Preparation From APInvoiceEntry graph you can find the method that release the invoice. Relese method is easy to find… Read more

Cases Escalation

Hi All, Have you faced the need of escalation process in Acumatica CRM? In general it is not so complicated to do with work-groups – when you need escalation you just change work-group. Support engineers can monitor a queue (or get a notifications) and work on case. But here we have quite some manual processes: add escalation note, change status, change work-group. However we can easily solve it with customization. Let me show you the scenario where you have 2 (or more) buttons: Escalate to L2, Escalate to L3 and so on. Each button will show you pop-up form that you need to feel before escalation and do other automation.… Read more

Generate IN Receipt from the Code

Hi All, In my experience I have quite a lot of questions like – how to create a document on the fly. The answer is rather simple – we need to use the same objects as user interface and emulate user interface behavior. As the main object that contains a business logic and validation is Grpah, we need to create it from the code and use for calling actions and pushing data. INReceiptEntry graph = PXGraph.CreateInstance<INReceiptEntry>() To create a new object we can use PXCache. INRegister header = (INRegister)graph.CurrentDocument.Cache.CreateInstance(); Every container control form UI is linked with Data View that is linked with DACs and tables. As you may know… Read more

Link Between GL And AP or AR

Hi There, In case you have not seen that before, Acumatica has links between GL Batch lines and AP/AR Invoices lines – Following conditions should be applied: GLTrain,TranType = ARTran.TranType; GLTrain,RefNbr = ARTran.RefNbr; GLTrain,LineNbr= ARTran.TranLineNbr; TranLineNbr is populated on release of a document in another module with the number of the corresponding line in that document. Please note that TranLineNbr can be empty in some cases. For example if you have consolidation posting to GL, than multiple AP/AR trans will be combined in one GL line, in that case TranLineNbr cannot be evaluated. Specially this field is not populated when PX.Objects.GL.GLTran.SummPost is ON. Using that knowledge you can update something in GL… Read more

Calling Base Actions by example of Generating Time Cards

Hi All, Just a short article where I can share with you customization that can generate time cards from uploaded time activities. Customization doing following: Selects the first and the last unreported (where no time-cards assigned) activity from currently selected employee. Goes week by week between first and last activities Create a new time card for every week using TimeCardMaint graph Code also automatically submit time card for approval In case there is unreported activity for already submitted or released time card, code can automatically generate time card correction and submit it again. It is not very useful customization, but it can be used as good example of calling actions in… Read more

Multi-Company Drop-Down

Hi All, Today want to show you how to have different values of drop-down in different companies: Company One Values 1, 2, 3 Labels “1”, “2”, “3” Company Two Values 3, 4, 5 Labels “1”, “2”, “3” To do this we can use following nice features in Acumatica Platform: PX.Data.Update.PXInstanceHelper.CurrentCompany – to get ID of current company FieldSelecting – Event where you can change/adjust value just before it will be included in response to browser. e.ReturnState = PXStringState.CreateInstance(…) – State contains full description of control that should be generated in the user interface with app UI properties and configurations. By adjusting state on the fly you can change list of… Read more

Adding new Report Button on Invoices and Memos screen

Hi All, Today want to share with you the case how to add a new button to print alternative Invoice Form right from Invoices and Memos screen. Lets check how does that work and check how original button “Print Invoice/Memo” is configured. Automation Steps Fist of all if you check the code, there is no handler for “Print Invoice/Memo”. That is some sort of virtual button defined through Acumatica Automation Workflow. If you check Automation Steps for “Invoices and Memos” screen you can find that menu “Print Invoice/Memo” is added to action “Report”. That is exactly action that will be executed in the code. If you click “Fill With Values”… Read more

Number to Words Localization

Good Day! Today want to give you an idea on how can you customize amount to words transcription in Acumatica.That might be required for any language localization. Here you can find simple example, but real complexity might be related to your language rules. All the main work around that feature is done by [PX.Objects.AP.ToWordsAttribute] It can be defined on virtual field, and upon accessing by UI or Report will do automatic transcription from number to text. e.ReturnValue = LangEN.ToWords((decimal)((PXDecimalState)DecimalVal).Value, ((PXDecimalState)DecimalVal).Precision); If you need you can apply that attribute to other amounts and reuse transcription for other reports. You can read more about it on StackOverflow. < In the code realization… Read more

Recurring Notifications about Expiring Quotes

Hi There, Any ERP system is designed to help users as much as it is possible. And one of very common human bug is bad memory. So ERP should solve this issues by recurring notification on multiple possible documents/items. Just as for example, how cool is to have notification on expiring contract, quote or cases, so we can take an action in advance. Based on the previous article on notification from templates that I have shared with you few days before, we can design an processing screen that will send notifications for us. So the main idea around it is – every day Acumatica scheduler will trigger our logic, that… Read more

Filtering Inventory Items by new Field

Hi There, Have you seen a situation when you want to filter list in the selector by the custom field? Most probably yes, as that is quite common requirement form many different users. Here I want to show you how to do that easily based on example with custom field in Inventory Item. Custom Field First of all lets add a custom field to inventory item. nothing complicated, just a custom text box. Showing Field in Selector By default that field will not be shown in selector, but we can easily add it there by modifying PXUIField Attibute: Visibility = PXUIVisibility.SelectorVisible. public class InventoryItemExt : PXCacheExtension<PX.Objects.IN.InventoryItem> {        #region UsrModuleNumber       … 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

Get PDF file from Report using Code

Hi Everyone, In this article I want to show you the way how you can dynamically generate PDF file from any report of Acumatica and attach if to an entity. I will do that on example of printing AR Invoice Form out of AR Invoice with custom button In general that task can be split in 4 steps: Defining reports parameters Creation and processing report Get report as PDF file Attach report to entity Parameters All reports have different parameter so before writing a code, check what parameters are required in that report. All parameter should be provided as dictionary – name/value. Report To work with reports you need a… Read more

Launch Multiple Reports with one Exception

Hi All Today I want to share with you an example how you can launch multiple unrelated reports with one single PXReportRequiredException. PXReportRequiredException has a helper method – CombineReport(..), where you can pass multiple ReportRequiredExceptions and Acumatica will process them together. Acumatica will extract each separate report from extension and can open it with following rules: Print all report as a single PDF file – ex.SeparateWindows = false; Open each separate report in a new tab – ex.SeparateWindows = true; There same rule as with other Pop-ups we can open it with new tab, window or the same window as well – ex.Mode = PXBaseRedirectException.WindowMode.New; Also note that you should pass report parameters… Read more

Copy notes from AP/AR Invoice to GL Batch

Hi All, Just want to share with you short example of how you can copy Notes and Files from AP/AR invoices directly to General Ledger Batch. For archive it we are doing following steps: Define extension for (AP/AR)ReleaseProcess graph. Exactly this graph is responsible for releasing operation. On the Initialize method we are trying to subscribe on InstanceCreated event for JournalEntry graph, where we can catch exact graph instance used for saving batch. InstanceCreated even is very useful for customization purposes. Here you can subscribe events and pass parameters between different graphs. Subscribe to ARRegister_BatchNbr_FieldUpdated to catch moment when batch is saved and linked to our invoice. Using graph and batch number… Read more

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