Contents tagged with Acumatica

  • One more description on how to modify behavior of Sales Orders screen in Acumatica

    Hello everybody,

    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:

    [PXOverride]

    public IEnumerable Action(PXAdapter adapter, int? actionID, DateTime? shipDate, String siteCD, String operation, 

        String ActionName, 

        Func<PXAdapter, int?, DateTime?, string, string, string, IEnumerable> baseMethod)

    {}

    as you can see, it's very similar to previous post, just … more

  • How to modify Process Shipments screen in Acumatica

    Hello everybody,

    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

  • Improve performance of grouping operations in Acumatica

    Hello everybody,

    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

  • How to notify about errors on Processing screens that are made through Automation schedules

    Hello everybody,

    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

  • NullIf and IsNull in Acumatica

    Hello everybody,

    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

  • How to allow Deleting of row in RowPersisting method of Acumatica

    Hello everybody,

    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

  • How to use PXUIVisible in Acumatica

    Hello everybody,

    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:

    [PXDBBool()]

    [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

  • How to override ExecuteSelect in Acumatica in your graph

    Hello everybody,

    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

  • What is Min. Markup, Markup, MSRP in Acumatica

    Hello everybody,

    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

  • Default values for inquiry for date in Acumatica

    Hello everybody,

    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

  • How to execute action Email Purchase Order in Acumatica and how create PXAdapter

    Hello everybody,

    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.Clear(PXClearOption.ClearAll);

        graph.Document.Current = graph.Document.Search<POOrder.orderNbr>( … more

  • How to rename buttons Process and Process All at processing screens of Acumatica

    Hello everybody,

    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:

    public YourGraph()

    {

            Actions["Process"].SetCaption("Email");

            Actions["ProcessAll"].SetCaption("Email All");

    }

    With such simple trick, you can assign any caption you wish to your buttons more

  • DataSelf analytics webinar after taste

    Hello everybody,

    today I want to write some kind of short summary of webinar meeting which was held yesterday by Joni Girady.

    Biggest impression

    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

  • How to manage default order of Columns in selector of Acumatica

    Hello everybody,

    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)]

    [PXDefault]

    [PXUIField(DisplayName = "Ship Via", Visibility = PXUIVisibility.SelectorVisible)]

    [PXSelector(typeof(Search<Carrier.carrierID>), new Type[]

           {

             typeof(Carrier.description), typeof(CarrierExt.usrDeliveryLength), typeof(Carrier. … more

  • PXDimensionSelector in Acumatica

    Hello everybody,

    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

  • How to speed up Acumatica debugging with tunning web.config

    Hello everybody,

    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. 

    Setting #1:

    To your <compilation debug="True" secion apped following line optimizeCompilations="True". In mine web.config I've got following look and feel:

    <system.web>

        <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

  • Filters in Acumatica

    Hello everybody,

    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.

    Storage

    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

  • Predefined Size Values in Acumatica

    Hello everybody,

    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:

    Value

    ColumnWidth in Pixels

    LabelsWidth and ControlSize of a Layout Rule; LabelsWidth and Size Properties of a Control in Pixels

    XXS

    100px

    40px

    XS

    150px

    70px

    S

    200px

    100px

    SM

    -

    150px

    M

    250px

    200px

    XM

    300px

    250px

    L

    350px

    300px

    XL

    400px

    350px

    XXL

    450px

    400px

    As you can see from presented table XL is not always the same XL, and it depends from the context more

  • How to have few Acumatica versions on single machine

    Hello everybody,

    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:

    Data

    Database

    Files

    Portal

    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

  • Performance difference in Acumatica between MS SQL and MySQL

    Hello everybody,

    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