“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

Another process has added/updated/deleted the ‘{0}’ record. Your changes will be lost.

Hi There, Today want to discuss with you how what is ” Another process has added/updated/deleted” error and how to investigate/fix it. Why it happens? Let’s start with error understanding. Actually, this error comes from potential differences between user copy of data and actuals in database. Before I jump into details I want to remind you few architectural points about Acumatica: Acumatica commits records one by one in most cases. For several records update statement will be executed multiple times. Also Acumatica stores the data needed to be save inside in-memory user specific cache. So it is possible that 2 users may have several versions of the same record with… Read more

Disaster Recovery vs Failover

Hi All, Today want to speak with you about protecting your ERP from accidents. There are 2 possible way to protect you application from disaster, which are different by approach and recovery time: Disaster Recovery (DR) – involves a set of policies, procedures and tools to enable the recovery infrastructure and systems following a natural or human-induced disaster. So basically disaster recovery assumes that disaster can happen and we just need to recover it as soon as possible. Failover Protection – is automatic switching to a redundant computer server, system, hardware component or network upon the failure. Failover basically assume that stability of the system should not be affected by… 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

Optimizing Large Import

Hi All Want to share with you some good approaches to Import a large amount of data. If you ever tried to import some large set of data from Excel you actually know that it is not as fast as importing data into the SQL table. There are plenty of reasons why it is like this: Data validation Defaulting empty field Running of business logic Data integrity Updating of referenced data Security tracking Audit Of course all these rules have different effects in different modules. It is obvious that GL is much faster than SO Orders. At the same time, AR is faster than SO, but slower than GL. Also… 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

Database Maintenance

Hi Everyone, Today i want to share with you some ideas of how you should take care of you database. Database is really highly loaded system: you doing a billions of operations,creating of millions of records every day/week/month. And all of these things should go together with highest security, performance and redundancy. To ensure a health of your database you should take case of it regularly, the same like you do with your own health. Otherwise, some day you will see something like this: This really means that something wrong happened with your database. It might be hardware, software, network or other failure. To ensure you database health, just schedule… Read more

Acumatica Customer Self-Service Portal

Hi Everyone Acumatica has 2 separate products that shares the same platform: Acumatica ERP – that is main application that has all available buisiness suites (financial, distribution and etc) Acumatica Portal – that is additional application that comes together with ERP. Portal uses the same platform, technology and database, so you will not see any difference in user interface. But it provides separate functionality that good to use together with ERP. Portal has separate functionality that can be used by external users (Customers, Vendors, Prospects, Investors) to get access to company internal information, documentation, support and financial information (invoices / payments). Portal share the same database with ERP, so all data… Read more

How to Debug Customization Code

Hi Everyone, Today I want to discuss how can you debug customization code that has been added from the user interface. The general plan is to move your code to from customization manager to Extension Library, than open in in visual studio and debug. 1) Select code that you need to debug. 2) Create Extension Library. 3) Move your code to Extension library 4) Open extension Library in Visual Studio 5) Find your code in Solution Explorer and put Breakpoint where you need it. 6) Use button “Attach to process” and select all w3wp.exe processes. 7) Click Attach 8) Use browser to trigger your code. Than system will automatically hit breakpoint and… Read more

Reset User Password

Hi Everyone, In Acumatica all passwords are stored as a Hash, so even if you get database, you are not able to login with user password. But in case of trouble you can reset it to new one directly in the database. Just execute this query against the sql: UPDATE Users SET Password = ‘123’, LockedOutDate =null WHERE Username = ‘admin’ Don’t worry about clear text password – Acumatica will automatically calculate new hash on first login operation. LockedOutDate is field where system stores last unsuccessful login attempt date-time. So if your user is locked out you can use this statement to unlock it. Thank you!

First Chance Exception Log in Acumatica

Hi Everyone, Acumatica has very powerful feature to catch and logging all exceptions that that has been thrown inside the system and application code. You are able to activate it in the Application Settings section of web.config file. <add key=”EnableFirstChanceExceptionsLogging” value=”false” /> <add key=”FirstChanceExceptionsLogFileName” value=”firstchanceexceptions.log” /> If you do not change the file name, it will be available by this path: “<SiteFolder>App_Datafirstchanceexceptions.log” This log can help a lot if you get any error without stack trace, or when you getting any problem without any information in the UI. Also this log can be very useful for Acumatica support team. You need to understand that using this mechanism you will catch all exception… Read more

Analyze Running Queries on Database

Hi Everyone. If you face database performance issues, you might need some way to get running queries from there. SQL profiler is good, but some times you do not have it or you don’t have access to it. But if you can run SQL queries, you can use this script. It will show you immediate snapshot of all running queries. Script: View the code on Gist. If you are searching for statistical information you can use that query. This one will show you to 30 heaviest queries on the sever. Script: View the code on Gist. Have a nice development!

Analyse Size of Acumatica Database

Hi Everyone, Sometimes, when you have big Acumatica database, you might want to know how much space does it taken by what table. This script can help you: View the code on Gist. The result of this script on my demo database is here: You can see that I have highlighted some tables that contains a lot of data. Actually some of them does not contains important information. Let me point you on some tables that you can archive and clear if you aware about space. This can be helpful if you use cloud hosting and the size of database is not cheep. Logs Tables LoginTrace – all login, logout, screen opening, session expired,… Read more

How to use Acumatica Trace

Hi All, What you need to check if you have any problem and you want to investigate it? Lets discuss Acumatica traces and log files/tables. The first place that you should check if you faced the issue in application is the standard Acumatica trace. Do you interesting in using PX trace from the code? Them welcome to this article. If you need you can write information to the trace direct from your code. For this task, you should use PXTrace static class. There are a lot of different auxiliary methods to write different types of events: public static void WriteError(string message) public static void WriteError(Exception e) public static void WriteWarning(string… Read more

Log Exceptions with First Chance Excetion Log

Hi All Microsoft .Net has a very nice feature like First Chance Exception Log. You can easily use it in your Acumatica to log specific exceptions. Read more about first chance exceptions. Now I want to share with you my logger example: Logger example: View the code on Gist. To to enable this logger, you just need to put an additional file to <SitePath>App_code folder and add this line to your global.asax file: void Application_Start(object sender, EventArgs e) { ….. SessionLogger.Initialise(); ….. } Based on this idea I have created a logger that catchs “Session Expired” messages for monitoring purposes. The source code of SessionLogger is available on GitHub.