Archives

Archives / 2020 / April
  • Why Acumatica can't restore snapshot bigger then 2Gb?

    Hello everybody,

    today I want to share with you my guess regarding why Acumatica can't restore snapshot bigger then 2 Gb. As far as I see at database level, all files are going into table UploadFileRevision. If to look into structure of this table, you'll find that it has column data, which looks like this: 

    if to google a bit, you'll find that maximum size which Varbinary(MAX) can accomodate is 2 Gb. 

    That's why if you snapshot is bigger then 2 Gb, look for other way of restoring of your snapshot

    Summary

    As of now it is my guess on why snapshot can't be restored. I'll update everybody how to deal with this, once I'll find solution, which satisfies me completely. more

  • Gross income and net income

    Hello everybody,

    today I want to leave a note on gross income and net income from two standpoints: business and employee.

    Gross income = Total sales - Cost of goods sold

    Net Income = Total sales - Cost of goods sold - Selling expenses. 

    Because Gross income = Total sales - Cost of goods sold quite often Net income is recorded in this form:

    Net Income = Gross income - Selling expenses

    If some business had 1 000 000 $ sales and cost of goods sold is 600 000 $ and selling expenses are 250 000 then

    Gross income = 1 000 000 - 600 000 = 400 000

    Net Income = 400 000 - 250 000 = 150 000

    But if you are an employee, then for you differnet definitions are applied.

    Gross income = all salary … more

  • How to implement PXStringListAttribute in Acumatica

    Hello,

    today I want to leave a post about code quality regarding of PXStringListAttribute. If to look in older versions of Acumatica manuals ( for example T200 manual ) you can see something like this:

    public class Something : IBqlTable

    {

        [PXStringList(

            new string[]

            {

                ShipmentTypes.CollectorNew,

                ShipmentTypes.CollectorSent,

                ShipmentTypes.CollectorResponded,

                ShipmentTypes.CollectorExpired

            },

            new string[]

            {

                "New",

                "Sent",

                "Responded",

                "Expired"

            })]

        [PXString]

        public virtual string Field { get; set; }

    }

    Recommended … more

  • How to deal with Could not load file or assembly in Acumatica

    Hello everybody,

    today I want to share one workaround, which I sometime use as temporary measure for migration projects. Imagine, that you've added reference to your bin folder of one of your old customizations. Then you build it, and you've got this error message:

    Server Error in '/xxx' Application.

    Could not load file or assembly 'xxxx' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    This error happens because you have in your customization C# part references to some older dll's which are not compatible with current version of Acumatica. So ideal solution would be to re-add to your … more

  • Пандемія коронавірусу? Ні! Пандемія егоїзму!

    Це мій перший пост українською на мому блозі. 

    Якщо ви не любите багато читати, то прочитайте наступне речення. Суть того що я хочу сказати наступна: «Якщо кожен у світі затримався б удома на 2 тижні або, скажімо, протягом одного місяця, COVID-19 уже б закінчився». Але через те, що всі кажуть: "У мене дуже важлива причина вийти на вулицю, інакше я помру", ми бачимо, як розростається COVID-19. І пандемія годується такими людьми, пожираючи частину з них, і частину невинних. Знову ж таки, якщо ви не любите читати, далі можете не читати.

    Вітаєю тих, хто має достатньо сміливості для продовження читання. Подумай над цим. Карантин протягом 2 тижнів безумовно показує, чи є у вас COVID-19 чи ні. Що … more

  • Pandemic of COVID-19? No! Pandemic of selfishness

    If you don't like long read, then read next sentence. Essence of the article: If everybody in the world would lock himself at home for 2 weeks, or at let's say for one month, COVID-19 will die. But because of everybody says "I have the most important reason to go outside, or I will die" we see unstopping spread of COVID-19. And pandemic is fed by such people. Again, if you don't like long read, then skip rest of the article.

    Congratulations to those who have enough courage to continue reading. Think about it. Quarantine during 2 weeks definitely shows if you have COVID-19 or not. It takes at maximum one month to get medical treatment from COVID-19 if you are sick with something like … more

  • How to add User defined fields to any entity in Acumatica

    Hello everybody,

    today I want to describe how at code level you can add User defined fields in Acumatica to any entity. Sequence will be this:

    In PXDataSource add attribute EnableAttributes. It may look like this:

    <px:PXDataSource EnableAttributes="true" ID="ds" 

    2. For target entity create table with same name, but with suffix KvExt. Query for creation of such a table may look like this:

    CREATE TABLE [[TargetTable]KvExt](

    [CompanyID] [int] NOT NULL,

    [RecordID] [uniqueidentifier] NOT NULL,

    [FieldName] [varchar](50) NOT NULL,

    [ValueNumeric] [decimal](28, 8) NULL,

    [ValueDate] [datetime] NULL,

    [ValueString] [nvarchar](256) NULL,

    [ValueText] [nvarchar](max) NULL,

      … more