Archives

Archives / 2019 / December
  • How to assign random values to each row in SQL for Acumatica

    Hello everybody,

    recently during testing of some logic for me it was necessary to assign some random values to table VendorPart in Acumatica. In order to achieve it, I've created such a script:

    update VendorPart set NetPrice = (ABS(CHECKSUM(NEWID()))% 3000.25 + 1.1 + 1), ListPrice= (ABS(CHECKSUM(NEWID()))% 3000.25 + 1.1 + 1)

    where NetPrice = 0 and ListPrice = 0

    of course such a query will not satisfy all requirements for random numbers generator, but in scope of my business scenario it was better then assign the same value to both columns.

    Summary

    If you want to have some diversity in digits for your values, use NEWID function for assigning values. more

  • Import data in Acumatica

    To import data (Customers for instance) from .xlsx format we need to make 3 actions:           

    Create Data Provider

    Create an Import Scenario

    Make an Import by Scenario

    1: First of all, before we will start do all those steps, we need to have .xlsx file with customers and such fields at least on the first row as a heading row:

    After that when we’ve checked Customers.xlsx file, click on the menu button and choose Integration tab.

       

    Afterwards on the Profiles subheading click Data Providers

    In the *Name field type the name of the future Data Provider to/from Excel format (Import/Export Customers to Excel) and in the next field  - * Provider Type: choose … more

  • Export data from Acumatica

    Hello everybody,

    I want to describe how to export data from Acumatica. 

    To export data (Customers for instance) to .xlsx format output we need to make 3 actions:

    Create a Data Provider

    Create an Export Scenario

    Make an Export by Scenario

    1. First of all, before we will start do all those steps, we need to create .xlsx file with such fields at least on the first row as a heading row:

    After that when we’ve created Customers.xlsx file, click on the menu button and choose Integration tab.

    Afterwards on the Profiles subheading click Data Providers:

    In the *Name field type the name of the future Data Provider to Excel format (Import/Export Customers to Excel) and in … more

  • Acumatica Sequence of Events

    Hello everybody,

    today I want to leave a picture, which shows sequence of events in Acumatica depending from happening scenario. 

    Sometime I'm getting questions from people like this: why after update of record I don't have my FieldDefaulting executed?

    Or why deletion of record doesn't trigger my RowUpdated event?

    Or why Save doesn't initiate RowInserting event and so on. 

    If you take a look on the picture you'll be able to notice that those questions easily addressed. 

    That picture shows that during update, you have executed FieldUpdating, FieldVerifying and FieldUpdated executed. But you will not get FieldDefaulting executed, 

    because it was executed before in Insert event. 

    Below … more

  • How to speed up database of Acumatica with RAID-10

    Hello everybody,

    today I want to leave a note regarding performance of database of Acumatica. Once I had request of possible speeding up of operations with DB.

    The most practical advice which you will hear will be put log files on one SSD drive, and mdf file on another SSD drive.

    But what to do, if that is not enough? What are other ways of speeding up DB in itself.

    As the answer I'd suggest to consider RAID-10 technology.

    Below goes simplest explanation of RAID-10 explanation and how it works:

    This picture says following:

    File MyFileN1.txt will be stored in four hard drives. Two times on RAID-1 array and two times on RAID-1 array, and splitting of it will be done through RAID-0 … more

  • Property from CROpportunity is not loaded

    Hello everybody,

    today I want to leave short note on issue with CROpportunity DAC class.

    For quite a few times I've noticed that someone adds field to CROpportunity, but later notices that field is lost either on moment of loading from database, or lost during persisting record to database.

    Reason for such weirdness is that starting from some Acumatica version CROpportunity got following declaration:

    [System.SerializableAttribute()]

    [PXCacheName(Messages.Opportunity)]

    [PXPrimaryGraph(typeof(OpportunityMaint))]

    [CREmailContactsView(typeof(Select2<Contact,

    LeftJoin<BAccount, On<BAccount.bAccountID, Equal<Contact.bAccountID>>>,

    Where2<Where<Optional<CROpportunity.bAccountID>, … more

  • Moving to another hosting

    Hello everybody,

    as you probably noticed, I didn't have many blog posts recently during months of November and December. Reason for such idling from my side was issues with hosting provider. For some weird reason hosting provided behaved not very decently, and for me it become necessary 

    to move to another hosting. After I moved to a newer hosting, I'll continue posting about interesting staff in Acumatica development, and not only Acumatica development more