Non-Programming Customization with Automation Step

Hi all, As you many know about this ” Some Acumatica ERP functionality is implemented through automation steps, which are steps to be executed on an Acumatica ERP form for specific records or objects generated in the system, depending on the properties of the record or object. For a data entry Acumatica ERP form, you can create any number of automation steps that redefine the functionality of toolbar actions, add values to combo box lists, or provide default values for the form elements, based on the properties of the records under processing. ” – Help Document Today I would like to share with you about the ability to do customization with… 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

Prevent SO Invoice from Posting Inventory

Hi All, A quick customization tip for you – if you need to cut Inventory posting from SO Invoice you can just simple override PostInvoice and don’t call the base method.In this case Invoice will be successfully released, but inventory transaction will be totally ignored. This customization might be important in some cases and have an easy customization!

Cash Discount Customization

Hi Everyone, Today want to share with you a ways to customize cash discount calculation in AP and AR. The main payer there is a TermsAttribute, that does all required discount calculations. It is linked to fields it need through parameters in constructor: ARInvoice.docDate – input – date of the document ARInvoice.dueDate – output – due data of the document ARInvoice.discDate – output – data where discount is applicable ARInvoice.curyOrigDocAmt – input – total document amt from where discount will be calculated ARInvoice.curyOrigDiscAmt – output – end discount value As there values are configurable it very easy to replace its calculations using customization framework and use different values as a… Read more

Easier way on adding Action Menu in Existing Graph

Hi Guys, to help you with coding or adding a Menu Action to an existing screen. Level: Basic Example Scenarios: Grouping Customized Reports  Organized Action Buttons Folder instead of displaying all buttons in toolbar First we need to define our Action Buttons Folder Action Action1 Action2 Then we override the screen’s Initialize() or Initialization Process Using public override void Initialize() then we add the Actions to the Action Folder with  this.ButtonFolder.AddMenuAction(ButtonItem1); Furthermore, please include  MenuAutoOpen = true to make the button not clickable as button and will act as a dropdown button. Please refer to the code below: Just publish the Customization Project, and it will apply accordingly. That’s it, have a nice… Read more

Extend Tax Calculation Precision

Hi All, A while ago I got a question about extract from document tax calculations in Acumatica. In Thailand there is requirement by law to calculate tax from Document Amount, however in Acumatica we have only option to extract tax from item amount. However this calculation is not aways correct due to rounding differences between line amounts and document amount. For example if you have 7% tax and 3 lines (47000, 18000, 9000) with total 74000 than: If you calc taxes from each line and sum it than you get Taxable Amt = 69,158.87, Tax Amt = 4,841.13 If we calc if using excel (Amt – Amt*1.07), than Taxable Amt… Read more

Tenant Selector In Acumatica

Hi All, Quick trick for you. If you need to link several tenants together, you can use the code from this article Tenant selector attribute: #region NeuralCompanySelectorAttribute public class CompanySelectorAttribute : PXCustomSelectorAttribute { public CompanySelectorAttribute() : base(typeof(UPCompany.companyID)) { DescriptionField = typeof(UPCompany.loginName); } protected virtual IEnumerable GetRecords() { PXCache cache = _Graph.Caches[typeof(UPCompany)]; Int32 current = PX.Data.Update.PXInstanceHelper.CurrentCompany; foreach (UPCompany info in PXCompanyHelper.SelectCompanies(PXCompanySelectOptions.Visible)) { if (current != info.CompanyID) yield return info; } } public override void DescriptionFieldSelecting(PXCache sender, PXFieldSelectingEventArgs e, string alias) { if (e.Row == null || (sender.GetValue(e.Row, _FieldOrdinal) == null)) base.DescriptionFieldSelecting(sender, e, alias); else { UPCompany item = null; Object value = sender.GetValue(e.Row, _FieldOrdinal); Int32 key = (Int32)value; foreach (UPCompany info… Read more

Put Document on Hold with Code

Hi All May Acumatica documents have an imbedded workflow. Hold/Unhold is usually a part of this worflow. Sometimes we may want to emulate user behavior thought the code, but there is a trick here. Acumatica’s Hold checkbox usually adds a hidden button that is triggered automatically when you check/uncheck hold. When you work thought the code you need to consider it and call button as well. Here is example on how to call hold on Purchase Order: public PXAction<POOrder> PutOnHold; [PXButton()] [PXUIField(DisplayName = “Put On Hold”)] public void putOnHold() { POOrder row = Base.Document.Current; if (row != null) { //row.Status = POOrderStatus.Hold; row.Hold = true; row = Base.Document.Update(row); Base.hold.Press(); }… Read more

Dashboards based on Real Screen

Hi All, You may know that it is easy to do a dashboard in Acumatica based on Generic Inquiry. But you also can enable your custom real screen to be a dashboard source. To do this you actually need only 3 things: Mark your Graph as dashboard source: [PX.Objects.GL.TableAndChartDashboardType] Mark you Data View as Filterable: [PXFilterable] Add a Data View delegate. For some reason dashboard does not work without it. I hope this issue will be solved soon. Full code source: using System; using System.Collections; using System.Collections.Generic; using PX.Data; using PX.Objects.AR; namespace CUrrentBranch { [PX.Objects.GL.TableAndChartDashboardType] public class CurrentBranchInvoices : PXGraph<CurrentBranchInvoices> { public PXCancel<ARInvoice> Cancel; [PXFilterable] public PXSelect<ARInvoice> MasterView; public virtual… Read more

Override Action – Confirmation Dialog

Hi Everyone, Want to give you an example of how to modify an action in Acumatica. specifically I’ll customize a Release action on Payments and Applications with adding a Confirmation Dialog with conditions. To customize an action we should follow the Acumatica customization guide. In simple words we should do following: Find the original action. Create a graph extension. Redefine the original action with the same parameters. Add own logic in the new action. Call base action code. Base Action Code To find the original Action you can use Source Code browser. Custom Code Your code will be called instead of the base action. You can put your custom code… 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

Custom field on CR Quote screen

Hi Everyone, If you try to add a custom field on CR Quotes in Acumatica 2018 R2 you may face very weird behavior – field is added, can be saved to database but as soon as you refresh screen or record valued disappears. The reason of this issues is PXProjection that is described in my separate article: PXProjection – SQL Views using BQL  This image show you how projection is defined in Acumatica CRM PXProjection uses 2 Data Access Classes for quotes: One class represents the table – PX.Objects.CR.Standalone.CRQuote Another represents view as combination of DACs in select – PX.Objects.CR.CRQuote And to correctly work, custom field needs to be added in… Read more

Use Split Container from Customization Browser

Hi Everyone, You may know that in Acumatica you can put several large containers (like grids and forms) together. But to controls or optimize space usage on small screen Acumatica uses special Split Container control. Basically this is the panel that you can drag and drop to reallocate space used by nested controls. To handle it Acumatica ASPX markup has special element: <px:PXSplitContainer runat=”server” ID=”PXSplitContainer1″ Orientation=”Horizontal”> <Template>   <AutoSize Enabled=”true” Container=”Window” />   <Template1> </Template1>   <Template2> </Template2> </Template> </px:PXSplitContainer> Under the Template1 and Template2 elements you can place other container controls like Form and Grid.  Here I have an example for putting grid into the Template1. <Template1>   <px:PXGrid runat=”server” ID=”grid11″ Height=”150px” SkinID=”DetailsInTab”  Width=”100%” SyncPosition=”True”>     <AutoSize Enabled=”True” MinHeight=”150″ />     <Levels>       <px:PXGridLevel DataMember=”DataMember1″>         <Columns></Columns>       </px:PXGridLevel>     </Levels>   </px:PXGrid> </Template1> Do… Read more

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