Archives

Archives / 2019 / May
  • Required of BQL in FBQL of Acumatica

    Hello everybody,

    today I want to describe how analogue to Required works in Acumatica Framework.

    For example, in the past ( before 2019 R1 ) you may read something from Acumatica with help of Required:

    var contact = PXSelect<Contact, Where<Contact.displayName, IsNotNull, And<Contact.displayName,  Contains<Required<Contact.displayName>>>>>.SelectWindowed(graph, startIdx, 1, ' ').First();

    Now, you can use @P.AsString, as shown on code sample below:

    var contact = SelectFrom<Contact>.Where<Contact.displayName.IsNotNull.And<Contact.displayName. Contains<@P.AsString>>>.View.SelectWindowed(graph, startIdx, 1, ' ').First();

    Conclusion

    Also take a note, that … more

  • Different methods of PXInstanceHelper class in Acumatica

    Hello everybody,

    today I want to document one important class in Acumatica: PXInstanceHelper.

    I have found it long time ago, but finally time arrived to show how it works and what features it has. So, PXInstanceHelper include such methods:

    Method AppDataFolder.

    In code it looks like this:

    var result = PXInstanceHelper.AppDataFolder;

    Screenshot of it's execution may give you additional hint of what it does:

    This method returns physical path to folder App_Data inside of Acumatica instance. As you can see from the screenshot, on my dev machine App_Data folder lives at

    C:\Program Files\AcumaticaERP\InstanceHelperDB\App_Data

    2. Method CurrentCompany.

    In code looks like this: … more

  • How to use F-BQL view instead of PXSelect

    Hello everybody,

    today I want to leave a short note on how to use F-BQL version of PXSelect in Acumatica.

    In past it was common to have this line of code in your graph:

    public PXSelect<Student1> Students;

    In new F-BQL introduced new construction, SeleftFrom. Proper way of using it is this:

    public SelectFrom<Student2>.View Students;

    Take notice of suffix .View. Without that suffix you'll not get proper F-BQL view. And Acuminator will give you this warning:

    So if to summarize, don't forget to add suffix .View

    more

  • How to download DAC schema browser

    Hello everybody,

    here is just short post on how to download DAC Schema browser which I recently opensourced.

    You'll need two steps:

    Navigate in your browser to link https://github.com/YuriyZaletskyy/DacSchemaBrowser

    Click on Star as displayed on screenshot (this is optional step):

           4. Right mouse click AcumaticaTablesFixed19x100x0122.zip

           5. Save customization wherever you wish

           6. Publish on your local instance

    That particular file is intended for Acumatica version 2019 R1 build 0122, but it should work on higher versions as well. Later on I'll add lower versions as well. more

  • How to get list of all Acumatica tables

    Hello everybody,

    today I want to share single line of code, which I found recently while digging Acumatica source code with reflector. Sometime you may need to know if there is some or antoher Acumatica table available. For example if you create some customization plugin. How to find out if there is some table? You can use following line of code for this purpose:

    using PX.Api.Soap.Screen;

    ............

    var acumaticaTables = ServiceManager.Tables;

    Variable acumaticaTables will have a list of Acumatica tables.

    more

  • Configuration Error for Acumatica T100 training

    Hello everybody,

    once upon a time Acumatica requires for certified developers to pass over certification again. 

    As obedient person I decided to install T100 sample application over Acumatica Framework Configuration ( don't mix with Acumatica ERP Configuration ). Then I navigated to just installed application, and here is what I've seen:

    Server Error in '/T100a' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The connection string name is missing for the … more

  • How to call action Cancel in Acumatica

    Hello everybody,

    Today I want to leave a short notice on how to call Cancel button of Acumatica from inside C# code:

    graph.Clear();

    That is it, Clear method is binded to button Cancel in Acumatica. Besides that Clear method will reload current data record from database and rolls back changes of Cache objects. more

  • PXUIRequired attribute usage in Acumatica

    Hello everybody,

    today I want to say a bit more about usage of attribute PXUIRequired as previous article on my blog wasn't very easy to follow by some of my readers.

    Take a look on presented code sample:

    public class sOOrderType : Constant<string>

    {

    public const string SOOrderType = "SO";

    public sOOrderType() : base(SOOrderType)

    {

    }

    }

    public class SOOrderExt : PXCacheExtension<SOOrder>

    {

    [PXMergeAttributes(Method = MergeMethod.Append)]

    [PXDefault]

    [PXUIRequired(typeof(Where<SOOrder.orderType, Equal<sOOrderType>>))]

    public virtual string CustomerOrderNbr { get; set; }

    }

    As you can see, besides attribute PXUIRequired it has declaration of constant value "SO". … more

  • One more definition of Group by for T-SQL

    Hi everybody,

    today I want to give one more definition of Group by of SQL language which for me is very explanatory.

    Group by statement produces a record for each unique combination of group by columns list and ommiting other columns of tables.

    Also you can apply aggregate functions to other columns. Aggregate functions may be count, sum, avg, mean, max, etc.

    And each of the functions will be executed against columns of groupped records.

    more

  • Logical sequence of T-SQL operations

    Hello everybody,

    Today I want to note that SQL Server has following order of processing:

    From

    Where

    Group by

    Having

    Select

    [Expressions]

    [Distinct]

    Order By

    [TOP/OFFSET-FETCH]

    By looking on this order you may understand why in C# LINQ from goes first and not select. That is because C# is imperative language, while SQL is declarative. more

  • Four classes of databases systems

    Hello everybody,

    I want to leave a short note on four types of database systems:

    OLTP

    DSA

    DW

    ETL

    Online transactional processing

    This type of systems is used for data entry, basically for CRUD operations. As usually some rules of normalization is applied there. Also OLTP is not suitable for reporting purposes because processing normalized data takes a lot of computing powers. That's why next type of systems is used:

    Data warehouses

    This kind of systems is used for data-retrieval and reporting purposes. Mainly it's structure is optimized for data-retrieval needs. Quite often tables have redundancy, fewer tables, simpler relationship between tables. You can learn a bit more about … more