Archives

Archives / 2014 / June
  • Failed to subscribe event CacheAttached in graph

    Hello everybody, who follows my blog.

    Today I want to share with you some surpsise of Acumatica which taken me some time. 

    In one of my graphs I added CacheAttached event in order to modify way of displaying title. As outcome I got something like this:

    Failed to subscribe event Graph::Table_Row_CacheAttached in graph Graph. Method signature looks like event handler, but cache Table has not been found in the list of auto initialized caches.Remove unused event handlers from code.

    Let's assume that Table name is BAccount. 

    It is possible to solve with the following statement:

    [PXHidden]

    public PXSelect<BAccount> HiddenBacount;

    The following statement added BAccount into list of auto … more

  • 11 lessons you will never learn in School

    Hello Everybody,

    I want to share what I found here some ideas:

    RULE 1: Life’s not fair. Get used to it

    You could be the smartest, hardest working most noble person alive and still not get that A. Or promotion. Or the girl, whatever floats your boat. The sooner you stop expecting life to hand you the things you think you “deserve”, the easier it will be to bounce back in those times when life knocks you down and just keeps kicking. You could earn your way to that promotion and still have it snatched from under you – get over it. That doesn’t mean sit back and take it. It means that you need to learn from those ugly situations and better position yourself to reap the benefits of your … more

  • Rename created grid column in Acumatica for specific graph only

    Hello everybody,

    today I want to share trick about renaming item in grid. Suppose you want to use developed by Acumatica data access class of acumatica, which has name BAccount, and you have huge desire to rename it in column from "Account name" to "Employee Name".

    You can use for such purpose CacheAttached event. In my case following code helped to achieve renaming:

    [PXDBString(60, IsUnicode = true)]

    [PXDefault()]

    [PXUIField(DisplayName = "Employee Name", Visibility = PXUIVisibility.SelectorVisible)]

    [PXFieldDescription]

    [PXMassMergableField]

    protected virtual void BAccount_AcctName_CacheAttached(PXCache sender)

    {

    } … more

  • MQL4 round numbers Indicator

    Hello everybody,

    Today I want to share with you another area. I had small order for MQL4 indicator for round numbers for Metatrader4 or as it is named MT4. The task was to draw lines at screen with some step at any currency pair. In order to implement it I started first of all Googling. Then I found almost implemented indicator at forexfactory just without option for modification steps. After wondering about code purpose of variables I created the following code:

    //**************************************************

    //* RoundNr.mq4 (No Copyright) *

    //* *

    //* Draws horizontal lines at round price levels *

    //* … more

  • SQL Formatting tool

    Few days ago I faced following challenge. SQL profiler gave me ugly SQL, which was unreadable for my eyes.

    For example like this:

    exec sp_executesql N'SELECT APAddress.AddressID, APAddress.VendorID, APAddress.VendorAddressID, APAddress.IsDefaultAddress, APAddress.RevisionID, APAddress.AddressLine1, APAddress.AddressLine2, APAddress.AddressLine3, APAddress.City, APAddress.CountryID, APAddress.State, APAddress.PostalCode, APAddress.IsValidated, APAddress.tstamp, APAddress.CreatedByID, APAddress.CreatedByScreenID, APAddress.CreatedDateTime, APAddress.LastModifiedByID, APAddress.LastModifiedByScreenID, APAddress.LastModifiedDateTime FROM APAddress APAddress WHERE (APAddress.CompanyID = 2) AND … more