today I want to write a short note on three states of fields existing in Acumatica:
- Exists but is empty
- Exist and have value
- Has null
If to speak about string, it can exist like this:
- Some value
Do you see difference between 1 and 3? Not easy. As usually developers of C#, show this difference like this:
- "Some Value"
And following screenshot with explanation shows how it works in case of SOAP contracts:
so, while you make integration, keep that in mind
today I want to say few words about new functions for redirect in Acumatica, and particularly about class PXRedirectHelper.
Classical approach from T200/T300 manual may look like this:
var currentCse = Cases.Current;
if(currentCse == null)
var graph = PXGraph.CreateInstance<CRCaseMaint>();
graph.Case.Current = graph.Case.Search<CRCase.caseCD>(currentCse.CaseCD);
if (graph.Case.Current != null)
throw new PXRedirectRequiredException(graph, true, "Case details");
But with new function all of those lines can be simplified to this:
PXRedirectHelper.TryRedirect(Cases.Cache, Cases.Current, "Edit case", PXRedirectHelper.WindowMode.NewWindow);
With that approach you'll get the same result, but just in one line of code.
today I want to give one more explanation of how to use caching and slots for caching purposes. Also there are plenty of articles on the subject, I want to give one more with simplest recipe. So, if you need to cache something, you'll need to follow this procedure:
- declare you class as something that inherits IPrefetchable
- Create some placeholder in your class for storing items in the cache
- Implement Prefetch
- Implement GetSlot
Take a look on the code below, how it can be done:
public class ArTranFetcher : IPrefetchable
private List<ARTran> _arTranList = new List<ARTran>();
public void Prefetch()
_configurableList = new List<ARTran>();
var dbRecords = PXDatabase.Select<ARTran>();
foreach (var csAttributeDetailConfigurable in dbRecords)
public static List<ARTran> GetARTrans()
var def = GetSlot();
private static ArTranFetcher GetSlot()
few more explanations on presented code.
- Placeholder will be _arTranList
- GetSlot will be monitoring database ARTran ( because of typeof(ARTran) statement ). So each time ARTRan will be updated, GetSlot will be executed automatically via framework.
- In your code you can get cached valus via following line of code: var arTrans = ArTranFetcher.GetARTrans();
with usage of such tricks, you can optimize plenty of staff. The only warning would be don't cache ARTran, as it will swallow up all memory of your server.
This one is a hot topic, recently chrome team released some changes to the Chrome Browser, so that some PAGES could get missing.
You still see Menu, still see screen list but the page itself is gone, blank, empty.
How to fix?
Just change settings in the Chrome:
1. Type chrome://flags/ in the browser address bar and press Enter.
2. You should see the list of options:
3. In the search bar type Lazy Frame or just Lazy:
4. Under Enable lazy frame loading choose Disabled:
5. Press Relaunch Now at the right bottom corner:
It is first time I write on topic of management and recruitment. Question is about one way of classifying your programmers, who work with you now or will come in a future. My main thesis is: all developers, roughly speaking, are divided into 4 large types and each of these types has its own application area.
Attempting to send the wrong type to solve inappropriate tasks leads to a failure ( inefficient work, or the employee leaves the team ). If you want to know why, you are welcome. Get ready, we have a lot of information. Basicallly what I say is my perception of world of programmers.
It is important to understand that there are no "bad" types. If any of the types you think is bad, then you just do not know how to use it. Remember: for each task should be a suitable tool. I will talk about all 4 types in the form of cards, giving a brief description, indicating the background, goals and motivations, as well as talking about strong qualities and weaknesses.
Especially it is necessary to pay attention to the background, as specific type of people grows out of their background. We begin with something what is easier.