Blog

Here I document some issues for searching of which I spent more then 15 minutes

  • Pagination in custom inquiry

    Hello everybody,

    today I want to share with everybody, and with myself code fragment, that allows to achieve pagination in custom inquiry pages. 

    Take a look on the code below:

      public class YourGraphInquiry : PXGraph<YourGraphInquiry>

      {

        public PXCancel<YourDACFilter> Cancel;

            public PXFilter<YourDACFilter> Filter;

            [PXFilterable]

            public PXSelect<YourDACDetails,

                Where2<

                    Where<YourDACDetails.Someid, Equal<Current<YourDACFilter.SomeID>>, 

                        Or<Current<YourDACFilter.SomeID>, IsNull>>,

                    And<

                        Where<YourDACDetails.Somepartid, Equal<Current<YourDACFilter.SomePartId>>, 

         … more

  • Database of Acumatica is in Recovery Pending condition

    Hello everybody,

    recently I've got interesting situation, when my database for Acumatica developed turned to be in Pending condtion. In order to deal with it, I've executed following SQL:

    ALTER DATABASE YourDatabase SET EMERGENCY;GOALTER DATABASE YourDatabase set single_userGODBCC CHECKDB (YourDatabase, REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;GO ALTER DATABASE YourDatabase set multi_userGO

    and my database turned back to normal.

    Update on 10/08/2019

    declare @dbName nvarchar(50);

    set @dbName = 'yourDatabase';

    exec( 'ALTER DATABASE' +@dbName  + ' SET EMERGENCY;')

    exec ('ALTER DATABASE ' + @dbName + '  set single_user')

    exec ('DBCC CHECKDB (' + @dbName + ' , REPAIR_ … more

  • Three states of fields in Acumatica

    Hello everybody,

    today I want to write a short note on three states of fields existing in Acumatica:

    Exists but is empty

    Exist and have value

    Has null

    If to speak about string, it can exist like this:

     

    Some value

     

    Do you see difference between 1 and 3? Not easy. As usually developers of C#, show this difference like this:

    ""

    "Some Value"

    null

    And following screenshot with explanation shows how it works in case of SOAP contracts:

    so, while you make integration, keep that in mind more

  • New functions for redirect in Acumatica

    Hello everybody,

    today I want to say few words about new functions for redirect in Acumatica, and particularly about class PXRedirectHelper. 

    Classical approach from T200/T300 manual may look like this:

    var currentCse = Cases.Current;

    if(currentCse == null)

    return;

    var graph = PXGraph.CreateInstance<CRCaseMaint>();

    graph.Case.Current = graph.Case.Search<CRCase.caseCD>(currentCse.CaseCD);

    if (graph.Case.Current != null)

    {

    throw new PXRedirectRequiredException(graph, true, "Case details");

    }

    But with new function all of those lines can be simplified to this:

    PXRedirectHelper.TryRedirect(Cases.Cache, Cases.Current, "Edit case", PXRedirectHelper.WindowMode.NewWindow); … more

  • Simplest cachinng explanation

    Hello everybody,

    today I want to give one more explanation of how to use caching and slots for caching purposes. Also there are plenty of articles on the subject,  I want to give one more with simplest recipe. So, if you need to cache something, you'll need to follow this procedure:

    declare you class as something that inherits IPrefetchable

    Create some placeholder in your class for storing items in the cache

    Implement Prefetch

    Implement GetSlot

    Take a look on the code below, how it can be done:

    public class ArTranFetcher : IPrefetchable

    {

    private List<ARTran> _arTranList = new List<ARTran>();

    public void Prefetch()

    {

    _configurableList = new List<ARTran>(); … more

  • Acumatica Page Missing under Google Chrome Browser

    Hello everybody,This one is a hot topic, recently chrome team released some changes to the Chrome Browser, so that some PAGES could get missing.You still see Menu, still see screen list but the page itself is gone, blank, empty.How to fix?Just change settings in the Chrome:1. Type chrome://flags/ in the browser address bar and press Enter.

    2. You should see the list of options:

    3. In the search bar type Lazy Frame or just Lazy:

    4. Under Enable lazy frame loading choose Disabled:

    5. Press Relaunch Now at the right bottom corner:

    more

  • Four types of programmers

    Hi.It is first time I write on topic of management and recruitment. Question is about one way of classifying your programmers, who work with you now or will come in a future. My main thesis is: all developers, roughly speaking, are divided into 4 large types and each of these types has its own application area.Attempting to send the wrong type to solve inappropriate tasks leads to a failure ( inefficient work, or the employee leaves the team ). If you want to know why, you are welcome. Get ready, we have a lot of information. Basicallly what I say is my perception of world of programmers.

    It is important to understand that there are no "bad" types. If any of the types you think is bad, … more

  • How to modify activities behavior on Business Accounts page

    Hello everybody,

    today I want to write a few words on how to modify behavior of buttons Add task, Add event, Add email, Add activity, ..., Add work item of Business Accounts page, one of which is shown on screenshot below:

    The main issue of chaning it is in the fact, that it is not just ordinary buttons, but separate class, which has injection of logic. Part of it's declaration goes below:

    public class CRActivityList<TPrimaryView> : CRActivityListBase<TPrimaryView, CRPMTimeActivity>

      where TPrimaryView : class, IBqlTable, new()

    {

      public CRActivityList(PXGraph graph)

        : base(graph)

      {

      }

      public CRActivityList(PXGraph graph, Delegate handler)

        : base(graph,  … more

  • How to deal with PX.Data.PXException: Cannot access the uploaded file. Failed to get the latest revision of the file error message

    Hello everybody,

    today I want describe how to deal with following Acumaitca error message: 

    Publish Customization

    Compiled projects: GAPRojectsBusinessAccounts,PayrollV2Acu2018Build20190328,EBizCharge2018R2,GACustomization

    Validation started.

    PX.Data.PXException: Cannot access the uploaded file. Failed to get the latest revision of the file a4353331-8f7f-4b3b-a881-2cdb4d5451e3

    at Customization.CstBinFile.GetFileFromDb() in C:\Bld\AC-FULL2018R226-JOB1\Sources\NetTools\PX.Web.Customization\CstDocumentDOM\CstBinFile.cs:line 120

    at Customization.CstBinFile.SaveFiles(FilesCollection context) in C:\Bld\AC-FULL2018R226-JOB1\Sources\NetTools\PX.Web.Customization\CstDocumentDOM\ … more

  • Strong name validation by pass

    Hello,

    here I want to leave a short notice how to manage strong name validation in Windows. For this purpose you can manage via following keys in regedit:

    To enable the strong-name bypass feature for all applications: switch the value for AllowStrongNameBypass to 1 inHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFrameworkHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework keys

    With those changes you'll get your validation turn off. If you want to set it on, then set AllowStrongNameBypass to 0 more

General information

Greetings to everybody stopping at my blog. Purpose of this web site is to be google of my brain. Everything I found useful, or of possible beneficial for usage in future I've save here at this blog

Contact information

If you want to contact me more on any subject printed at this web stie, you can email me: zaljur1989(at)gmail.com

Job information

If to speak in general, I'm developer. For now I work as team lead in company GlobalLogic.