Contents tagged with Acumatica
today I want to present a bit differnt code sample on how to append to behavior of Actions menu items of Sales Orders screen.
Quite often there are tasks like add something before ( preprocessing ) or after some menu item action was executed. Once I've described it alredy here, but just want to give another example with usage of Func.
Take a look on following code sample:
public IEnumerable Action(PXAdapter adapter, int? actionID, DateTime? shipDate, String siteCD, String operation,
Func<PXAdapter, int?, DateTime?, string, string, string, IEnumerable> baseMethod)
as you can see, it's very similar to previous post, just … more
recently I was asked to modify behavior of Process shipments screen in Acumatica. Issue was the following: in case if one of the rows on Process shipments generated error, it was needed to show on the status of processing.
Default behavior was like showed on the screenshot:
as you can see on the screenshot, despite errors were generated on the row level, whole status of processing is fine ( green in the top ).
Of course for my QA such kind of behavior is weird and he asked me to fix it.
Such behavior happens because Process shipments screen ( SO503000 ) uses PXProcessing.SetProcessTarget() to set the processing delegate which doesn't care at all about errors in the … more
today I want to write a note about interesting case I faced recently.
I was asked to load from Acumatica database Sales orders joined with PO Receipts by inventory, but I had one issue. It was needed to join only by latest PO Receipt, not by allo PO Receipts. In other words it was needed to take only one element of each group.
As usually such kind of implementation is done with help of overloading delegate, which loads all data from SQL Server into memory and then does grouping operaions in memory. Such approach is workable on relatively small cases, but if database of customer
is around 130 Gb, then we faced timeout issue.
How to deal with it.
After some trial … more
today I want to leave a short notice on how to send a message from your graph for cases, when your graph is used in processing screen which is implemented through Automation steps. For this purpose you can use new property of PXAdapter class. It has property
MassProcess. In case if your graph will be executed from processing screen that property will be set to true. Then you'll get a chance to notify processing screen about error with help of SetError message. In that case in your graph you can write something like this:
var currentSoOrder = currentSoOrderBoxed.GetItem<SOOrder>();
string errorMessage = string.Format(WorkFlowMessages.creditLimitExceededTemplate, … more
recently I debugged code of Acumatica, and found following expression:
[PXFormula(typeof (Switch<Case<Where<Add<SOOrder.releasedCntr, SOOrder.billedCntr>, Equal<PX.Objects.CS.int0>>, SOOrder.curyOrderTotal, Case<Where<Current<SOSetup.freightAllocation>, Equal<FreightAllocationList.prorate>>, Add<SOOrder.curyUnbilledOrderTotal, IsNull<Mult<Div<SOOrder.curyUnbilledOrderTotal, NullIf<SOOrder.curyLineTotal, decimal0>>, SOOrder.curyFreightTot>, decimal0>>>>, SOOrder.curyUnbilledOrderTotal>))]
I always got scared when I see such kind of expressions. I have a feeling that it was written by somebody who can easily pass zebra puzzle. Unfortunately I'm not such a men.
While … more
today I want to tell interesting behavior of method RowPeristing in Acumatica graphs. Try to guess, after which actions of user that event is getting called? Save ? Yes. Delete? Also yes! Insert? Also yes.
If you ask me why? I'll not provide you an anser. But I want to leave a piece of code which describes how to understand which action was called. I'll demonstrate it on sample of SOShipLine, and you'll be able to use it for other DAC classes, with slight modificaitons.
Here you can see two cases:
protected void SOShipLine_RowPersisting(PXCache sender, PXRowPersistingEventArgs e)
var soShipLine = e.Row as SOShipLine;
if (sender.GetStatus(soShipLine) == … more
today I want to leave a short notice on how to use PXUIVisible attribute. I already mentioned that attribute in this article but today just want to give one more example of it's usage.
Take a look on the following code:
[PXUIField(DisplayName = "Shipment display")]
[PXUIVisible(typeof(Where<Terms.visibleTo, Equal<TermsVisibleTo.all>, Or<Terms.visibleTo, Equal<TermsVisibleTo.customer>>>))]
protected void Terms_UsrShipmentDisplay_CacheAttached(PXCache sender)
As you can see from the example, PXUIvisible expectes from you to get some kind of where condition. Another important detail is that control, from which visibility depends should have … more
today I want to leave a short notice on how to override ExecuteSelect method in your own graph for debugging purposes. I found following code useful:
public override IEnumerable ExecuteSelect(string viewName, object parameters, object searches, string sortcolumns, bool descendings, PXFilterRow filters, ref int startRow, int maximumRows, ref int totalRows)
//Here you can analyze what is coming into your select
var result = base.ExecuteSelect(viewName, parameters, searches, sortcolumns, descendings, filters, ref startRow, maximumRows, ref totalRows);
//And here you can … more
today I want to leave a note about few abbreviations in Acumatica related to Price/Cost info tab.
Min. Markup % - percentage. In other words that is minimal addition to price which your company adds to cost of buying of something
MSRP - manufacturer suggested retail price
Markup - extra cost added to price. more
today I want to leave a short note on Default value for the inquiry screens for Data type. For date you can use following predefined values:
@WeekStart and @WeekEnd - as name suggests start and the end of Current week
@MonthStart and @MonthEnd - start and the end of Current Month
@PeriodStart and @PeriodEnd - start and the end of Current period
@QuarterStart and @QuarterEnd - start and the end of Current quarter
@YearStart and @YearEnd - start and the end of Current year
@Today - today is always today
I hope this short notice will help you better feed dates into your inquiries. more
today I want to post code sample on how to execute menu item "Email Purchase Order" in Acumatica.
I mean this fragment of Purchase order screen:
If you'll try to find the source code of that Action or menu item, you'll be disappointed because you'll not find it. As some other actions, Email Purchase Order is implemented in Acumatica as combination of Automation steps with C# functions.
Below goes code sample, that allows you to call that method with help of static method:
public static void SendNotificationForGraph(POOrderEntry graph, POOrder order)
graph.Document.Current = graph.Document.Search<POOrder.orderNbr>( … more
today I want to leave short notice on quesiton how to rename buttons or if to be more specific change title of buttons at Processing screens. By default those buttons have captions Process and Process All. The simplest way to rename them is to use constructor of processing graph. In constructor you can make something like this:
With such simple trick, you can assign any caption you wish to your buttons more
today I want to write some kind of short summary of webinar meeting which was held yesterday by Joni Girady.
My most general impression is that Joni is a real proffesional in Datanalytics staff, and of course the fact that Acumatica chosen their product as their inhouse platform shows that not only I made such a conclusion.
Among technical parts of the meeting I want to point practical comments on how C-level people can cultivate analytics approach in their company. In other words how to make your employees to help you analyze situation in your company.
Search for data hungry people
Promote such data hugry people ( nothing works better then life … more
today I want to leave a short notice on how to manage order of columns in Selector of Acumatica. Quite often customers has desire to manage default order of columns in selector. That is very easy to achieve with new Type parameter added to your selector. Take a look on how I've managed list of columns for Carrier with help of new Type:
[PXDBString(15, InputMask = ">aaaaaaaaaaaaaaa", IsKey = true, IsUnicode = true)]
[PXUIField(DisplayName = "Ship Via", Visibility = PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(Search<Carrier.carrierID>), new Type
typeof(Carrier.description), typeof(CarrierExt.usrDeliveryLength), typeof(Carrier. … more
Today I want to describe PXDimensionSelector attribute usage in Acumatica. According to manual PXDimensionSelector attribute has following purpose:
Defines an input control that combines the functionality of the PXDimenstion attribute and the PXSelector attribute. A user can view the data set defined by the attribute and select a data record from this data set to assign its segmented key value to the field or to replace it with the surrogate key.
After reading such purpose, I've decided to read purpose of PXDimension attribute:
Defines an input control that formats the input as a segmented key value and displays the list of allowed values for each key segment.
If … more
today I want to make short post on how to speed up Acumatica debugging. I'll share with you options that worked on my machine.
In case if you have something to add, I mean something that really affects speed up of page loading, you are welcomed to do it.
To your <compilation debug="True" secion apped following line optimizeCompilations="True". In mine web.config I've got following look and feel:
<compilation debug="True" defaultLanguage="c#" numRecompilesBeforeAppRestart="9999" targetFramework="4.7.1" batch="True" optimizeCompilations="True">
Setting #2 and #3:
To your appSettings add/update key CompilePages and InstantiateAllCaches … more
in this article I want to describe how filtering in Acumatica work. When I say filtering, I mean following UI part:
In manuals T100 - T300 there is almost nothing about how filters work, so I want to share few bits of development information.
All information about filters is stored in database in tables FilterRow and FilterHeader.
Take a look on screenshot of FilterInformation for some custom applied filter:
As you can see from screenshot Acumatica stores information about filters by FilterID, and has information like Condition, values, Close brackets, operators and so on.
Also there are DAC classes FilterRow and FilterHeader, but you can find them only … more
today I want to leave a post on Predefined size values for ColumnWidht, LabelsWidth, ControlSize properties of the PXLayoutRule component and LablesWidth and Size properties of a control:
ColumnWidth in Pixels
LabelsWidth and ControlSize of a Layout Rule; LabelsWidth and Size Properties of a Control in Pixels
As you can see from presented table XL is not always the same XL, and it depends from the context more
today I want to leave a short comment about how to make few Acumatica instances of single developer machine.
As you already know or maybe know, Acumatica recommends to have one version of Acumatica. But what if you want more? Is Acumatica merciful enough to allow you this? The answer on this question is strong yes!
All that you need to do, is to install version that you need, and then preserve following folders in safe place:
And then you can uninstall them and install another version.
Then for installing specific instance of Acumatica you'll need to run AcumaticaConfig.exe file and you'll be ready to go. more
today I want to write a few words about performance difference between MySQL and MS SQL in Acumatica.
Relatively recently Acumatica provided possibility to use MySQL as it's database. For some unknown reason
I didn't notice anybody who decided to use MySQL as their database solution. If you know any, please let me know,
how they like their experience.
For me as developer it become interesting to check performance of MySQL vs MS SQL. Especially from standpoint of servers.
Take note on how one of mine task managers look like:
as you can see I have 40 logical cores or 20 physical cores. Try to guess what is price of license for MS SQL for using at such a computer? … more
- « Older