today I want to describe how to work with Filters, that applied to grid in Acumatica page.
For demonstration purposes I'll use Requisition form.
So, first of all, I want to say that dealing with Filters you'll need .View.GetExternalFilters() method.
At requisition form graph extension you can get it like this:
List<PXFilterRow> filters = Base.Lines.View.GetExternalFilters()?.ToList() ?? new List<PXFilterRow>();
Demonstrated line of code will give you list of applied filters, or empty list, if no filters were applied to grid.
Take not on how filters look like in debugger:
honestly speaking, applied filters look very similarly to applied ODATA protocol. On my … more
today I want to leave a post about the following case: you need to index rows in your database by some unique value, which can be null. And you don't want index to include those values which are null.
How to achieve it? Following T-SQL can do this:
CREATE UNIQUE INDEX idx_studentcardid_notnull ON dbo.Students(studentcardid) WHERE studentcardid IS NOT NULL;
in this example MS SQL will create Unique index, but that index will be applied only to non null values, while null values will be ignored by WHERE condition. more
today I want to leave a short notice on OBJECT_ID in MS SQL.
Quite often I've seen sql like this:
IF OBJECT_ID(N'dbo.Students', N'U') IS NOT NULL DROP TABLE dbo.Students;
Today I have found time to discover what it actually means.
OBJECT_ID is function, that checks wheather object exists or not. It accepts two parameters: object name and object type. In my case object name is dbo.Students, object type U is internal representation of table.
today I want to leave a notice with proposal on how to program reaction on clicking of Abort button in processing screen.
Recently it become needed for me to program some functionality to happen after user clicks on button Abort of processing screen.
In my case I needed somehow to program exit from some threads which were running in parallel and I needed to finish one iteration of threads and then exit from each of those threds.
One more point was that just terminating of threads was also a bad idea. After a while I have found IPXCustomInfo interface. With that interface you can gain control on what to do in case of user
clicking on Abort button. In my case I did … more
F1 Displays the Office Assistant or (Help > Microsoft Excel Help)
F2 Edits the active cell, putting the cursor at the end
F3 Displays the (Insert > Name > Paste) dialog box
F4 Repeats the last worksheet action (Edit > Repeat)
F5 Displays the (Edit > GoTo) dialog box
F6 Moves to the next pane in a workbook (if the window is split)
F7 Displays the (Tools > Spelling) dialog box
F8 Toggles whether to extend a selection with the arrow keys
F9 Calculates All the worksheets in All the open workbooks
F10 Toggles the activation of the Menu Bar
F11 Displays the (Insert > Chart) dialog box that creates a chart (on a chart sheet) using the highlighted range
F12 Displays the (File > Save As) … more
today I want to leave a short post on how to create some custom view in Acumatica Customization if that view doesn't exist:
if not exists (select * from sysobjects where name='CustomerSelector' and xtype='V')
'CREATE view [CustomerSelector] as
select Distinct b.CompanyID, cc.Phone1, a.City, a.CountryID, b.TaxRegistrationID, c.CuryID, cc.Salutation, c.CustomerClassID, b.Status
from BAccount b inner join customer c on b.BAccountID = c.BAccountID inner join [Address] a
on a.BAccountID = b.BAccountID inner join Contact cc on cc.BAccountID = b.BAccountID'
This code will create view CustomerSelector only if such view doesn't exist in … more
today I want to leave short fragment of code, which anybody can use for processing records in Acumatica chunk by chunk. By default, everybody in Acumatica including myself uses Select method. Select works quite
well, but has one limitation: it reads all information that satisfies filtering conditions. But imagine that you need to read not all records, but some limited set i.e. top 5000 records.
Next code fragment shows how to read from table CSalesOrder top 5000 records:
And<CSalesOrder.CustomerError, IsNull>>>.SelectWindowed(this, 0, 5000).
here I want to leave a short notice on how to avoid hearing yourself if you are connected over TeamViewer to somebodies computer. By defualt TeamViewer duplicates sound that goes through sound system of computer to which you've connected.
Not many people know, that such functionality can be disabled. For this purpose you need to navigate to the following:
After those steps you'll be able to avoid hearing sound of yourself via skype or other communication utility.
For convenience I have also screenshot: