Contents tagged with Acumatica

  • Inventory items images structure in Acumatica

    Hello everybody,

    today I want to document some information about how images for inventory items are stored in Acumatica. 

    Database structure (Acumatica)

    InventoryItem - A table that contains all InventoryItem data

    > ImageURL - A data field where the image file name being saved.

     

    UploadFile - A table that contains attachments data

    > Name - A data field where you can use to join with InventoryItem using InventoryItem.ImageURL = UploadFile.Name

     

    NoteDoc - A table that contains all NoteDoc data

    > FileID - A data field unique ID where you can use to join with UploadFile using UploadFile.FileID = NoteDoc.FileID

     

    A SQL query that get data necessary to create the imageExternalLink … more

  • How to set command time out part 2

    Hello everybody,

    today I want to document few ways on how to modify command time out. Sometime it may happen that you have some kind of long runnig queries, and at some particular graph you may want to make it live longer. 

    For such purposes very convenient is PXCommandScope object. Below goes code sample that allow you to achieve this purpose:

     using (new PXCommandScope(PXDatabase.Provider.DefaultQueryTimeout * 2))  // increasing 2 fold {               var results = PXSelect<BAccount>.Select(this); }

    with such code you can get twice a time for your BQL statements.  more

  • How to modify Query timeout in Acumatica

    Hello everybody,

    today I want to share with you some trick which I used for cases if I get error message that some select from Acumatica timed out. Sometime if you work with big tables ( ~2 millions of records ) you may face timeout errors. Especially it is troublesome for processing screens when you are ready to wait for some kind of functionality just in order to be complete. Let me introduce you to property DefaultQueryTimeout of PXDataBase.Provider static class. By default it's value is set to 90, which means that it will be executed by sql server for 90 seconds. I should admit that for majority of cases it is more then enough. Except for cases when you need to fix some bugs in code. … more

  • Create customization to MYOBAdvanced(Acumatica), part 2 сreate page, graph, DAC class extension and xml page for mobile

    So, continue the work:). Part 1 is here.

    Part 2 сreate page, graph, DAC class extension and xml page for mobile

    First of all, In project I create folder "DAC" and add two clasess:

    ActivityTypes.cs

    This class need to filter types rows from table CRActivity(column name - Type). Client asked display all events for that Business Account of type "Phone Call", "Client Visit" and "Futile Visit" So for this I do next:

    public static class ActivityTypes

       {

           public const string F = "F";

           public const string M = "MEET";

           public const string P = "P";

           public class fType : Constant<String>

           {

               public fType()

                   : base(F)

               … more

  • Create customization to MYOBAdvanced(Acumatica), part 1 description of the task, prepare to start

    I want to tell you some little history about how was created customization to existing MYOBAdvanced (Acumatica) project.

    One guy who buy and use acumatica from MYOBAdvanced (myob.com), asked me to create customization.

    He wrote:

    "

    The standard platform under Business Accounts has the Activities tab, which is where we record the data. Refer to attached screenshot.

    I need a search page as follow on the app/mobile device:

    Search field which only searches the Business Account Name field. 

    The user enters text, then Business account names that match that text are displayed, the user then selects the required account.

    The page then display all events for that Business Account of type " … more

  • How to separate Automation schedules in Acumatica

    Hello everybody,

    take a loot at the following picture:

    Let's say that you would like to have two Acumatica instances connected to the same database. Is it possible? Definetely yes, just with pointing both of them to the same connection string and you'll get some kind of scalability. 

    But imagine that your Acumatica has execution of some automation schedules. How to make sure, that only one of them will be executor of Automation schedules, not both of them?

    Very simple. Just add this key to web.config of Acumatica which should not be Automation schedules executor:

     <add key="DisableScheduleProcessor" value="True"/>

    Default value of DisableScheduleProcessor key is false, so you need … more

  • How to modify Stock Item screen ( IN202500 ) in Acumatica with adding master detail selectors

    Hello everybody,

    today I want to describe how to extend Stock Item screen IN202500 in Acumatica. Imagine that you need to add to tab General settings two selectors. Suppose that you need to have two selectors:

    as you can see following need to be achieved:

    To tab General Settings it is needed to add selectors: "Clase articulo web" and "Subclase articulo web".

    In case if selector "Clase articulo web" changes, then "Subclase articulo web" should show some other values.

    The first step should be start Acumatica developer project as described here.

    For cases if we have dependency of one selector from another it is possible to program in two ways:

    Custom selector for dependent code. … more

  • Operator IN in BQL

    Hello everybody,

    today I want to write a few words about operator in which was presented in SQL for long ago, but weren't available in Acumatica BQL. But time goes on and now you can use it. For example like this:

    Object[] values = new String[] { "BXW000004", "BXW000005" };

                    POOrder item = PXSelect<POOrder,

                        Where<POOrder.orderNbr, In<Required<POOrder.orderNbr>>>>.Select(Base, values);

    that code will generate following sql statement:

    Select * from POOrder POOrder Where POOrder.OrderNbr In ('BXW000005', 'BXW000004')

    Order by POOrder.OrderNbr

    I can say that such approach simplifies some tasks that require dynamic passing of arguments.

    more

  • Scaling Acumatica horizontally

    Hello everybody,

    today I want to share one interesting piece of information about horizontal scaling of Acumatica. I mean as usually for majority of people it is clear that Acumatica can work on one machine when DB, IIS and Acumatica lives on one machine. 

    One more variant of scaling can be when you have IIS with Acumatica on one machine, and DB on another machine. It can look like this:

    Here User lives on his machine, Acumatica ERP server lives on second machine, and site database lives on third machine. That is pretty good working schema especially for cases if you need vertical scalability.

    But recently I've discovered little bit more horizontal scalability for Acumatica which … more

  • Automation schedule screen is not executed

    Hello everybody,

    today I want to describe interesting feature of Acumatica related to back ups of database. Imagine the following: you've restored database from back up at your dev environment. And let's say you have automation schedule that every hour you should send to each contact some emails. So, you've restored customization and would like to find the button that will block sending of all emails. At which screen it is? At none. It is interesting to know, that Acumatica already "pressed" at this button when you've restored db from back up. But for now you probably have another question. How to debug execute any schedule at all?

    I propose following steps:

    Delete all automation … more

  • How to modify default time zone at Acumatica

    Hello everybody,

    today I want to make a short notice on how to change default time zone in Acumatica. 

    In my case such need appeard when it was needed to modify default time zone of Acumatica that I've restored from database backup. In order to do this you'll need to go to screen that is named Site preferences. Id of that screen is sm200505.  more

  • Branch restriction in Automation schedule in Acumatica

    Hello everybody,

    today I want to describe one behaviour of Acumatica processing screen. 

    So, once upon a time I created processing screen. Purpose of that screen was simple: take data from some external source and insert it into Acumatica. 

    As that processing screen worked fine, it was taken a decision to create automation schedule step that will make that screen to be executed by Acumatica automatically. And then following issue arised: also that screen worked great in manual mode, it didn't work at all in Automation schedule mode at all. 

    After long investigation I found the following:

    Automation screens are executed from the user acount admin

    Also admin should have access to … more

  • Different types of search in Acumatica

    Hello everybody,

    recently friend of mine gave me wonderful question:

    In PXSelect command, I saw Search, Search2, Search3… keywords, please explain the difference.

    Thats really good question which shows his attentiveness to details.

    So, no let's go part by part.

    Targets

    First of all, Search statement can be applied to those kinds of attributes: PXSelector, PXDbScalar and PXDefault. 

    Also you can apply Search statement to cases when you updated something in cache of Acumatica and what to reopen that part. It can look like this:

    Document.Search<POOrder.orderNbr>(currentPoOrder.OrderNbr, currentPoOrder.OrderType);

    or like this:

    [PXDefault(typeof (Search<Company.baseCuryID>))]

    Don' … more

  • How to modify Approve and Reject actions in Purchase orders screen

    Hello everybody,

    today I want to share some knowledge about interesting feature of Acumatica: Approve and Reject actions in Purchase orders screen.

    When I was asked how long it will take to modify behaviour of Approve and Reject actions, I've thought it will be easy task. Find appropriate Actions, overload then and enjoy life. But with those two actions life is more complicated. 

    After speaking with Acumatica support I've realized that those two actions are declared as Automation steps, so in order to work with those actions it will be needed to look into knowledge about Automation steps. The only memeber that has relation to those actions are type of EPApprovalAutomation. 

    So, in order … more

  • How override Persist method in Acumatica

    Hello everybody,

    today I want to show sample of code on overriding Persist method in Acumatica. 

    Consider following scenario, you need to modify saving logic of screen Purchase Orders in Acumatica. How you can achieve this? Following steps can help you to do this:

    Create extension class for POOrderEntry

    Override Perist method

    Both of those details implemented below:

    public class POOrderEntryExt : PXGraphExtension<POOrderEntry>

    {

        [PXOverride]

        public void Persist(Action del)

        {

            //Here you can add some of your code that should be executed before persisting PO Order to database

            del();

        }

    }

    With such simple steps you can modify persisting … more

  • How to hide tab in Acumatica

    Hello everybody,

    today I want to share piece of knowledge about Acumatica controls. Recently I was asked to add one more tab to page Checks and payments.

    Let's suppose it was named Allocations. It should be displayed only if type of payment is set to Prepayment.

    Such kind of behaviour is possible to implement via three steps:

    Add tab with name Allocations

    Set VisibleExp to the following: 

    VisibleExp="DataControls[&quot;edDocType&quot;].Value==PPM"

    Set BindingContext to the form like this:

    BindingContext="form"

    Or just more detailed picture:

    </px:PXTabItem>

    <px:PXTabItem Text="PO Allocations" VisibleExp="DataControls[&quot;edDocType&quot;].Value==PPM" BindingContext=" … more

  • DeletedDatabaseRecord in Acumatica

    Hello everybody,

    today I want to write few words about interesting feature of Acumatica: column DeletedDatabaseRecord. As you may know plenty of ERP systems have strategy of holding everything that ever passed through them, and even if user has huge desire to ask ERP system to forget something via deletion of some entity, ERP "pretends" that record was deleted, but leaves it in db. 

    From this standpoint Acumatica can be exception. It allows to preserve records that lived inside of it. Allows mean can preserve or not preserve. 

    How programmer can achieve this kind of behaviour? Via column DeletedDatabaseRecord. 

    If you want Acumatica to hold some kind of entities in db, just add this … more

  • Multithreading in Acumatica

    Hello everybody,

    today I want to say a few words about my practice of usage Multithreading in Acumatica. I have a dedicated server which has 40 cores. And I have a need to read plenty of records from some other system. General schema is like this:

    Create some graph instance.

    Fill created graph instance data views with needed data

    At created graph instance call method graphInstance.Actions.PressSave();

    And that schema is perfectly workable, but for my disappoitment my 40 cores were not busy at all with doing something useful. So I had to figure out how to use them more fully. 

    Here are some fragments of code that I've used:

    int numberOfLogicalCores = Environment. … more

  • Some notes on Buttons creation in Acumatica

    Hello everybody,

    today I want to write few words about buttons usage in Acumatica.

    So, first of all, if you just need to add button at your form, you can use following syntax:

    public PXAction<PrimaryDACClass> SomeAction;

    [PXButton(CommitChanges = true)][PXUIField(DisplayName = "Some Action")]protected virtual void someAction(){      ...}

    Following syntax will create a button for you in the top buttons panel of Acumatica.

    Take note of CommitChanges=true attribute. In case if you need just some activity without persistance to database, then you can set it to false. But if you want button to save some changes to database then set it always to true.

    There is one more way of declaring … more

  • Some digging in tables of Acumatica

    Hello everybody,

    today I want to document one useful sql query that can be beneficial for cases if you need to dig in Acumatica tables, and need quickly to find type of some particular column.

    Here it is:

    select * from information_schema.columns where table_name = 'SOLine' and COLUMN_NAME like '%OrderQty%'

    that sql will let you know all information about column OrderQty. more