Archives

Archives / 2018
  • Practical value of unit tests

    Hello everybody,

    Here will be another interesting benefit of writing unit tests which I've discovered recently for myself. 

    Simplified testability

    Imagine, that for you as for developer arrived some kind of bug. After investigation you've found that bug is caused with imporper method functionality. How can you fix method without unit tests? Way will be like this:

    Add code fix

    Execute application and make effort to re-prodcue bug

    If bug is not re-produced, you make commit/push and enjoy life

    If bug is not fixed, go to steps 1 - 3 one more time.

    Here is how those steps can look like in unit test:

    Add unit test that feed into method with bug wrong values

    Add fix to code … more

  • Some notes on xUnit usage

    Hello everybody,

    today I want to share with you small explanation about how xUnit works. 

    Take a look at presented code:

    [Theory]

    [InlineData(3, 4, 5)]

    [InlineData(7, 8, 9)]

    public void MethodDemo(int numberOne, int numberTwo, int numberThree)

    {

        double[][] data = new double[1][];

        data[0] = new double[3];

        data[0][0] = numberOne;

        data[0][1] = numberTwo;

        data[0][2] = numberThree;

        var sut = new Matrix(data);

    }

    If to describe this code in words, it has following meaning. 

    Attribute Theory says that it is test method which should be exeuted.

    Repeated twice Attribute InlineData says that method MethodDemo should be executed twice, with assigning to … more

  • Access rights in Acumatica

    Hello everybody,

    today I want to leave a short notice on how access rights work in Acumatica. So, if to enumerate them, there are following access permissions: revoked, select, update, insert, delete. 

    If to enumerate them in the list of smallest permissions to biggest, it will be list like this:

    Revoked - user can't see or edit

    Select - user can see, can't edit

    Update - user can see and edit

    Insert - user can see, edit, create new

    Delete - user can see, edit, create, delete

    So, if you configure permissions, and want to give highest level, then give Delete. But if you want to protect system from accidental deletion, then most probably you'll need give them Select set of … more

  • C# async/await usage

    Hello everybody,

    today I want to describe in simple words what C# does for .Net cases in IIS.

    Before I continue, I want to point the following. As usually IIS has 500 threads. It means that one IIS server can simultaneously server 500 customers. Keeping this idea in mind

    take a look at the following code:

    [HttpGet]

    public IEnumerable<string> GetSync()

    {

        string val1 = "value" +  LongRunningMethod().ToString();

        string val2 = "value2";

        return new[] { val1, val2 };

    }

    private int LongRunningMethod()

    {

        Thread.Sleep(10000);

        return 10;

    }

    and imagine that you have 600 customers simultaneously. For 500 lucky users of your web site it will mean that their … more

  • Import export data between different SQL servers

    Hello everybody,

    today I want to share some information on how to import some big chunks of data from one server to another. Need for this movement for me personally arised when I had a need to transfer big amounts of data on a regular basis. Big amount means 2.5 millons of records. My first apporach was to use SQL Server 2017 Import and Export Data. Initially I've used 32 bit tool, and found out that I sometime face strange error messages. After some googling I've found that for big volumes of data it's better to use SQL Server 2017 Import and Export Data 64 bit. 

    and all of the sudden strange configuration errors, drivers lack error, ODBC driver error had leave me. 

    So, one of the … more

  • Some notes on usage Table variables

    Hello everybody,

    today I want to share some fragment of SQL, that I've used for updating tables in Acumatica.

    First of all, I'd like to show table variable that I've created:

    DECLARE @SalesOrderInformation TABLE

    (

      OrderType nvarchar(2),

      OrderNbr nvarchar(12)

    )

    It has nothing special, just two fields: ordertype and ordernbr. 

    I need them as temporar storage for future update. T-SQL allows to use two kind of temporary tables: table variable and temp table, which starts from #.

    I prefer table variables for the following reasons:

    1. Performance. Because limited scope, as usually performance fo table variables is faster then temp tables. 

    2. Temporary tables instead of table … more

  • GDPR trainint certificate

    Hello everybody,

    today I want to share a screenshot of GDPR training completion and a few words about training from Business Fraud Prevention Partnership.

    First of all, I'd like to say that Business Fraud Prevention Partnership made a great explanation of what GDPR is, and what it is not. 

    I've enjoyed from the way how they split information. They used for splitting differnet wordings, picures which made it easy to memorize information. 

    Prior to taking their course I've spent some time reading about GDPR, but if I just read without any quiz in the end, most probably information will move in brain in some passive mode and that's it. But with their tests it will stay longer and will be … more

  • How to set some value in Acumatica screen and tell about it to Acumatica

    Hello everybody,

    today I want to write a short note about persisting something to Acumatica.

    Sometime it happens that in your code you have something like this:

    SomeDacInstance.Field = somevalue;

    and following workflow:

    User clicks on save, you code is executed, you go in record, refresh page and surprise: somevalue is not there. How to deal with it? In such cases you'll need to use method SetValueExt.

    For example one of readers of mine blog had the following code:

    row.LotSerialNbr = modificado2;

    cache.Insert(row.LotSerialNbr)

    but that approach didn't save value for two reasons:

    1. simple assign of value doesn't tell acumatica cache about any changes.

    2. Inserting something … more

  • Required instead of current in Acumatica

    Hello everybody,

    today I want to fulfill my promise that I gave to one of my readers. 

    He left at mine blog following question:

    How do we use required<> in place of current<> and pass some string constant for selector? That question was asked in context of this article. 

    That is good question and I also want to add that answer on it will be at least to some degree disappointing. First of all, if you work with selectors, you can't use Required. Required is intended for use in Graphs.

    But if you want to use some constant filtering conditions, you don't need Required attribute at all. You can use mechanism of Constants, which works perfectly without Required. 

    Take a look at the … more

  • How to insert correctly new Sales order into Acumatica with external graph

    Hello everybody,

    today I want to write a short notice on how to create new sales order in Acumatica properly.

    So, first of all take not that SOOrder type has two keys. One key is or order type, and second key is for OrderNbr.

    It means that you can't do code like this:

    var newSOrder = sOEntry.Document.Insert();

    sOEntry.Document.SetValueExt<SOOrder.orderType>(sOEntry.Document.Current, sorder.AcumaticaOrderType);

    or actually you can, but later you'll face some issues with duplicated sales orders ( as I recently faced ).

    But what you should do if you wish create new Sales order is the following code snippet:

    var newSOrder = new SOOrder();

    newSOrder.OrderType = sorder.AcumaticaOrderType; … more

  • Cross validation. Sklearn.model_selection, sklearn.cross_validation

    Hello everybody,

    today I want to describe a bit more about cross validation and how to work with it in Python. Here I describe how to split learning set once or how to use different cross validation strategies. 

    Before I'll continue, I'd like to describe different types of splitting data for training. 

    There are following ways to split data:

    1. Split on 70/30 ( sometime 80/20 ) on two sets: Training data, Validation data. 

    You train data on training data, and validate on holdout data. 

    This approach has following pros/cons:

    (+) model is trained only once

    (-) depends from the splitting

    (+/-) works fine for big data sets

    In order to understand one more case take a look at … more

  • Built in data sets in Sklearn and visualization with Pandas

    Hello everybody,

    today I want to write a few words about built in data sets in sklearn library of python but from Visual Studio 2017 prospective. You may ask why Visual Studio 2017 if there are plenty of other options? I can say that main reason is becuase I like debugging features that availabile in Visual Studio which make my life much simpler. 

    Initial headers and one function

    So, before we continue, we need as usually in Pythong import some basic libraries. You can do it in Visual studio like this:

    import sklearn

    from matplotlib import pylab

    import matplotlib

    import matplotlib.pyplot as pyplot

    import numpy as np

    from sklearn import datasets

    def sanitize_sequence(data): … more

  • Different kinds of tests

    Hello everybody,

    Today I want to write a really short description of different kind of tests, which can be perfomed by code.

    Unit test: Specify and test one point of the interface of single method of a class. This should have a very small and well described scope. Complicated dependencies and activities to the outside staff are stubbed or mocked.

    Integration test: Test the correct co-operation of multiple subsystems. There is whole ecosystem here, from testing integration between two classes, to testing integration with the production environment.

    Smoke test (AKA Load test, AKA Sanity check): A simple integration test where we just check that when the system under test is … more

  • How to check Automation step settings in Acumatica

    Hello everybody,

    today I want to describe some tricky feature of Automation steps. 

    Quite often in Acumatica I face interesting challenge. I've added some code in Row_Selected, open some screen, and to mine disappointment I find that screen totally ignores mine code. What can stand behind such weird behaviour?

    One of the explanations can lie behind automation steps. If to put simply, automation steps is a feature of Acumatica, that allows to program it without any usage of C# code. All that is needed from you as Acumatica user is just add via GUI designer staff on the form and then via automation steps configure it's behaviour. 

    So, let's consider some details, that can help you to … more

  • C# feature nameof

    Hello everybody,

    today I want to share with you one cool feature of C#.  It is nameof. Take a look at the following code:

    var abc = 3;

    var varName = nameof(abc);

    How do you think, what will go into varName? It will be equal to "abc". Probably you can puzzle why on earth I can need such an operator?

    Consdier following cases:

    1. If you work with reflection, then instead of rely on hard coding names of fields, you can rely on compiler to subsitute it instead of you. 

    class Program

    {

        public class NameOffDemo

        {

            public string SomePropertyOne { get; set; }

            public string SomePropertyTwo { get; set; }

        }

        static void Main(string[] args)

        {

             … more

  • PXPrpojection, Data Projection what is it?

    Hello everybody.

    Imagine that you need to have implementation of several tables with possibility to update them all. 

    Also you want to implement by the Acumatica side rather than by the database.

    You know that Joined tables in Acumatica are read-only and you cannot update fields there

    Can we create/use SQL-like views in Acumatica?

    How can I join grouped (statistical) view to the DAC?

    So, yes we can do it. For this purpose Acumatica gives you PXprojection attribute.

    PXProjection attribute  binds the DAC to an arbitrary data set. The attribute thus defines a named view, but is implemented by the server side rather than by the database.

    Lets start)

    Steps:

    Think whats tables you … more

  • Amazon storage

    Hello everybody,

    today I want to write a few words about Amazon storage. 

    So, first of all I'd like to say that Amzaon provides to kinds of storage: 

    Ephemeral

    S3

    If to speak about ephemeral, then I can say that main purpose of this storage is temporary storing of your data. If to compare ephemeral storage with S3 it has following limitations:

    access speed is not guaranteed

    there is not service level agreement for this service

    You can use ephemeral storage for the following staff:

    buffer

    cache

    scratch data

    etc...

    Let's talk now about S3. Question 1, why it is named S3? Amazon Simple Storage Service, or three letters S. 

    it has following features:

    Accessible via … more

  • 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 construct complicated queries in BQL of Acumatica

    Hello everybody,

    today I want to describe the following situation. Imagine that you have to write following SQL statement in Acumatica:

    SELECT InventoryItem.InventoryCD, InventoryItem.imageUrl, UploadFile.Name, NoteDoc.FileId, * FROM InventoryItem

    LEFT JOIN UploadFile ON InventoryItem.imageUrl = UploadFile.Name

    LEFT JOIN NoteDoc ON UploadFile.FileID = NoteDoc.FileID where imageurl is not null

    I myself prefer to have way to write a code that is easy to modify and maintain. So instead of creating one big BQL statement I'd like to make it as few smaller statements. Is it achievable with Acumatica BQL? Yes, it's achievable. Take a look at following code that does exactly what I've … 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

  • Monitor diagnostics window of Visual Studio

    Hello everybody,

    today I want to share interesting feature of Visual studio Diagnostics Tools window. 

    Take a look at picture below:

    as you can see on the picture it has plenty of gray diamonds with few red ones. Try to guess, what is purpose of red diamonds or red rhombs? It shows that some exception happend during exectution and also if you point cursor of mouse on that diamond, it will show you text of exception. Pretty cool, huh ?

    more

  • How to increase display size of items in SQL server management studio

    Hello everybody,

    today I want to document one interesting feature of SQL Server management studio. Some time it happens, that you work with big XML data files.

    For example if you have sql statement like this:

    SELECT @xm=( select rowid, count(rowid) as IdsNumber from SOLine s where s.rowid like 'fdsafewvvcxkfdsla'fslf%' group by rowid for xml raw, root) select @xm

    in SQL server management studio and would like to increase size that is workable by SQL server management studio. I found that following value in system registry is very helpful:

    HKCU\Software\Microsoft\SQL Server Management Studio\14.0_Config\XmlEditor\MaxFileSizeSupportedByLanguageService

    set it's value to 100 and you'll … 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

  • Convenient parsing of XML nodes in C#

    Hello everybody,

    today I want to share with you code that I use in order to conveniently to parse different xml nodes in C#. 

    Take a look at this class:

    public static class XmlNodeProcessor

        {

            public static int? ParseInt(this string s)

            {

                if (string.IsNullOrEmpty(s))

                {

                    return null;

                }

                return int.Parse(s);

            }

            public static long? ParseLong(this string s)

            {

                if (string.IsNullOrEmpty(s))

                {

                    return null;

                }

                return long.Parse(s);

            }

            public static Guid? ParseGuid(this string s)

            {

          … more

  • Create customization to MYOBAdvanced(Acumatica), part 3 сreate customization and publish it

    So, continue the work:) 

    Part 3 сreate customization and publish it

     Create customization

    To create customization for import to MYOBAdvanced (acumatica) I need go to Customization - Customization Project and add new customization (Screenshot 10):

    In this example I use design of acumatica ( add screen, add page,  files and scripts) see Screenshot 11.

    Also I add sql script that will add new column "UsrBodyWithoutHtml" to table "CRActivity" (Screenshot 12"):

    After this click on "Publish"; I see whether validation has passed and there are no errors. If all ok I can close window and click export customization. ActivityCustomization.zip folder will be downloaded.

           

        … 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

  • Clock

    Hello everybody,

    today I want to leave a note about one of mine customers. And you know, as soon as I've started to write this post I've caught myself that I can't name one person for whom I provide services for money with word customer. Please continue reading and you'll grasp what I mean. 

    Have you ever wonder how it could happen that Steve Jobs, guy that is not a designer, not UI-UX designer could orchestrate development of such cool devices? I always dreamed to meet such a person in life, not just read about them in wikipedia, or to read their books. And I can say that recently I've meet such a person. 

    Everything started from project that he asked me to create. And of course, I'm … 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

  • Functions map, zip and lambda in Python

    Hello everybody,

    today I want to describe three elements of Python: map, zip, lambda and *.

    Zip and *

    The first step that I want to describe is zip and * usage. Take a look at the following code:

    a = [5, 6]

    b = [7, 8]

    c = zip(a,b)

    print(*c)

    How do you think, what will be output, if I'll tell you that zip function zips arrays? If your guess is (5, 6) (7, 8) then unfortunately you are wrong. Output will be the following:

    (5, 7) (6, 8). I suppose that zip name was chosen because as usually zippers on clothes as usually vertical. Zip functions "zips" elements by columns, like presented on the picture:

    Now one more question, what is purpose of * ? It tells to Python interpreter to … 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

  • How to merge precision and recall

    Hello everybody,

    today I continue writing notes about measuring quality of learning. You can read my previuos artcile 1 and article 2 about measures of quality of learning. If to summarize two of those articles we have the following:

    accuracy is good measure, but if samplings is unbalanced then accuracy can have great numbers, but total model will be very bad.

    precision tells you how objects model a(x) can find

    precision and recall work fine on unbalanced samplings

    And then question arises, is it possible somehow to merge them, but not as accuracy but as something more meaningful then accuracy?

    I'll decribe different ways to describe it going from worsest to better and hopefully … 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

  • How helping others can transform your life

    Here in Ukraine there is a joke: nothing spoils health of Ukrainian more then richness and welfare of his neighbor.

    Also I often hear statement that helping others can transform your life to better. I've spent some time on finding the ways to help others. But helping not via giving money. As one man once said give somebody fish for two times and for third time that person will demand fish from you. So I wanted to be a person that can give fishing rod to people instead of just giving them fish.

    As result I've decided to teach some close friends of mine programming. Well, it is not a surprise because I'm quite skillful in that area and what else can I teach? And you know, it changed my … more

  • How to measure quality of learning part 2

    Hello everybody,

    today I want to add few more notes about measuring of quality of learning, but today about tasks of classification. 

    So, one of the ways can be measuring number of wrong answers. For example with usage of the following formula:

    Imagine that your classification set has three possible labels: a (10 elements ), b ( 15 elements ), c ( 20 elements ). And let's say that your model wrongly classified 2 out of a, 3 out of b and 4 out of c. In that case following formula is applicable:

    Historically it happend that in classification tasks it is common to maximaze function, while in regression learning vice versa. 

    Another common measurement of quality of classification is … more

  • How to measure quality of learning

    Hello everybody,

    Today I want to describe some ideas about measure quality of learning. 

    First of all I want to point areas where you can apply those measurements. It can be in three areas:

    For setting funtional during learning

    For picking hyperparameters

    For evaluation of ready made model

    Another way can be combination. You can measure quality during learning with one measurement, but final model you can analyze with other measurement. 

    MSE

    So, let's start with most common formula: mean squared error:

    In words it reads the following: difference between prognozed value and desired value, squared, summed and finally averaged. 

    MSE has following featues:

    Easily minimizable … more

  • InvokeIfRequired template

    Hello everybody,

    today I want to document simple but very useful feature if you work with multiple threads in Winforms application. 

    Quite often it happens that you execute in some paralel thread long running calculations and would like time from the time notify results to UI. 

    But if you try to do this then you'll get an error that will say to you that parallel thread doesn't have permissions to some control because it didn't create such a control. So, how then update UI?

    The answer is simple, you should use method Invoke of the control. In that case everything inside of method Invoke will be executed from UI thread. 

    Needless to say that such approach is workable but to some degree … 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

  • Update-Database Error on switching from .Net core 1.1 to 2.0

    Hello everybody,

    today I want to share some strange behaviour that I faced. 

    Recently I needed to switch from .Net core 1.1 web app to .Net core 2.0 app. 

    I found over internet that simplest way to achieve it will be just opening project in Visual Studio 2017 and VS will switch your project by itself. I decided to give to such attempt a try. 

    Initially all went fine. Visual Studio 2017 gave me very nice looking report which convinced me that life is easy and wonderful. Actually it said that project was switched to .Net core 2.0 with success.

    Then I've tried to execute in package manager console Update-Database command. Unfortunately I've seen following error message:

    An error occurred … more