Tuesday, June 9, 2015

Adding Verification Logic to a Field

Hi Guys,

There is a common customization task to add some piece of business logic to a field.
Here is the example of adding verification to a Journal Transaction screen.

In short, for certain Accounts (Expense and Income) I will need to check that user entered Customer or Vendor into Journal Transaction screen. Balance Sheet accounts should be skipped.

Here is how it supposed to look like:

Thanks to a reworked Acumatica API documentation, it was not a Rocket Science to develop a simple piece of code below that covers this logic:

Please take note of:

sender.RaiseExceptionHandling<GLTran.referenceID>(e.Row, row.ReferenceID, new PXSetPropertyException(ErrorMessages.FieldIsEmpty , PXErrorLevel.RowError, typeof(GLTran.referenceID).Name));

That identifies where exactly to show a red cross Error.

All the Best,


Monday, June 8, 2015

Sending Mail Issues. SMTP server configuration.

Hi Everyone,

For those using Send Mail functionality in Acumatica, there is almost always a problem with SMTP servers, they may not process your e-mail due to certain conditions are not met.

For example, you may have Office 365 account and willing to add it to Acumatica as a system E-Mail account.

There will be an issue when other persons start sending mails from Acumatica, as Office 365 server require Sender to be exactly your account name or at least a person from your domain.

There could also be a case when you set up Acumatica in your internal domain, and are not willing to expose / connect it directly to a public mail server.

Easiest way to avoid these problems is to install an SMTP Relay server at your office. Well this is not really a hardware box server, just a piece of software running on one of your machines, it could even run on Acumatica server itself, as it does not depend on anything, well at least we don't want it to.

So I was looking for a good candidate for SMTP relay with some "alter" functions on the outgoing e-mails and found this software:  EMailRelay Software

This is not just open source, freeware, SMTP relay. It is also a Message Transfer Agent. Meaning it can change the Envelope of your E-Mail, it can also change the content of the Header or Body of your E-mail.

This is perfectly what we need - to alter "From:" address, in case of Office 365 usage.

Also this software can work as a server. I will not go deep into installation procedures, it is simple enough, just download correct version (32 or 64 bit) then unpack it, run the configurator, it will guide you through simple steps. Put Office 365 Server as a relay server. Make sure port 25 is open for incoming E-Mails. You can also configure it as a service, to run when you log off from the machine.

Now, the most interesting part, altering the body of the message and envelope.

Software comes with 4 examples in JavaScript, that you can use.
What it does: when message is received from Acumatica, but not yet relayed to Office 365 SMTP, there is an option - to run Java Script and alter the content of the E-Mail.

What I have done in my script file, you can make your own file by the way:

Please make sure you added a call into a BAT file that system created for SMTP relay, to invoke these alterations. --filter parameter.

Happy mailing!

All the best,

Friday, February 13, 2015

Performance Profilers in Acumatica

Hi Everyone,

In the latest Acumatica version 5 we have added 2 powerful tools to help you finding bottle necks while designing your applications at Acumatica Framework.

There could be 3 types of potential areas of interest for developer/consultant.

A. SQL Server. Luckily we have native Microsoft SQL Profiler to address that. So my article will be about the other part. IIS.

B. Internet Information Server Memory resources.

C. Internet Information Server CPU resources.

Memory Profiler.

This utility can provide us detailed information on memory usage by the IIS server, with per session tracking.
Once started, screen get the memory snapshot from the IIS. Please pres refresh button on the grid and we will see all the session information.

If we click Details, it will display per session memory usage like below:

On the right side of the screen it shows amount of used memory per process.

Request Profiler.

Is a tool to investigate time taken by an IIS request, to execute the business logic or other tasks performed by the user. Once you opened the screen, please make sure check boxes below are ticked.

Then, once you refreshed the results, the grid will populate results. What I have done is run GL Transactions screen, and here is the result:

As you may have noticed, longest process was Release, it took 0.5 sec of the single cpu IIS execution time.

Happy debugging,


Thursday, October 30, 2014

Free Acumatica Sandbox

Hi Everyone,

Acumatica team released a marketing document, explaining sandbox usage. What I am really happy about is a clear black and white statement there.

We are not robbing our customers when they decided to use Acumatica sandbox for training, testing, archival purposes. Local sandbox is free of charge.

Would you decide to put it on our cloud, it will have some nominal fees involved, but again, if you need it FOC, install locally and enjoy!

An Acumatica Sandbox is a separate instance of your Acumatica environment. You can
do anything you want in the sandbox – all without impacting your current deployment
and your users.

A Smooth Transition For New Rollouts Or New Employees
Leverage an Acumatica Sandbox to give new or existing users a hands-on experience
with Acumatica. Safely verify features and functionality, grant limited access to drive
adoption with power users without impacting other groups of less frequent users, and
also test customizations and integrations before making them live.

A Reliable Development Environment
An Acumatica Sandbox allows you to develop and test new solutions for your
organization in an environment that mirrors your live implementation. This enables
you to test real-world scenarios and involve users from different function areas before
going live.

Sandbox + Snapshot = Peace Of Mind
If you have a Private Cloud sandbox, you can use Acumatica’s advanced snapshot
technology to quickly set up your sandbox. You can take a snapshot of your Acumatica
instance at any time, and restore the downloaded copy to the sandbox environment
which you then manage separately. This enables you to test or modify your current
Acumatica instance without impacting users or your live deployment. Your partner can
help set up your first local instance.

Acumatica offers multiple sandbox options to meet your business requirements.
Whether you have a SaaS, SOP, or perpetual license, you can deploy your sandbox
wherever you prefer.

Thank you Acumatica team!

All the best,


Monday, October 13, 2014

Configuring Affinity Mask at IIS Server. Acumatica CPU Licensing.

Dear Partners,

There were many questions recently on how to properly configure the server to match the license purchased from Acumatica.

Under our VAR agreement, the partner is responsible for proper server configuration. Such if customer bought 4 CPU cores, there must only be 4 CPU cores allocated for the Acumatica on IIS server Application Pool. This is not just a legal requirement, that is stated in our product EULA, this is a subject for Acumatica support eligibility and overall stability of the system. 

To address this important question we should keep in mind:

A. Acumatica License Version

B.A. Acumatica Edition (Departmental 2CPU, Divisional 4CPU or Enterprise 8CPU) for versions prior Acumatica 4 
B.B. Acumatica License Size (S 2CPU, M 4CPU, L 8CPU, XL 16CPU)

C. Number of actual CPU cores at your IIS server

Lets assume few scenarios: 

Scenario 1. Your IIS server is sitting on the same hardware box with the SQL server. Total number of CPU cores at the hardware machine is 8 (Eight). License purchased from Acumatica is Perpetual Departmental, meaning you got license for 2 CPUs only. How should we configure the server?

Vital configuration part in this scenario will be to allocate TWO out of EIGHT CPU cores for Acumatica Application Pool. CPU cores are counted from 0 to 7. So lets allocate Core 7 and Core 6 for Acumatica instance. Mask to cover this scenario should be 11000000 in a binary notation or 192 in decimal. All we have to do to stay on a legal ground and to get support from Acumatica and not to risk loose our license is:

Call up IIS Manager from the Main Panel

 Find what is the Application Pool Name for our Acumatica Web Site

Now we should change the Mask settings for that Application Pool

After you choose Advanced Settings for the pool, please modify these settings according to our mask choice

Scenario 2. Your IIS server has 4 CPU cores, and you have purchased the license from Acumatica for M size, which is 4 CPU cores.

No configuration is necessary on the server as number of CPU cores purchased and available on the server matches.

Please note Scenario 2 is the easiest for the End User to provide assurance that there is no license violations or misuse.

All the best,