Contents tagged with Acumatica

  • Acumatica DAC class generator

    Hello everyboydy,

    today I want to share with anybody mine implementation of DAC class generator.

    By default Acumatica provides you with DAC class generator which is pretty good.

    But time from the time I had a need to generate DAC class into text field, and then

    put it somewhere in my solution, and Acumatica DAC class generator didn't feet to

    mine needs. So I decided to create my own DAC class generator. 

    This form has simple interface. In the first line you enter Connection string, at second

    line you enter table name, press at generate, and receive DAC class.

    You can download source code here. 

    Below goes also some C# code which I've comment later:

        public  … more

  • How to add sitemap into your customization

    Hello everybody,

    today I want to descrive some simple steps of how to add into your customizaiton sitemap. As you already know, sitemap of Acumatica is saved in database. And if you make customization of your sitemap you may need to add to your project.xml something like this:

    <Customization level="0" description="" product-version="5.30">

        <SiteMapNode>

            <data-set>

                <relations version="3" main-table="SiteMap" />

                <layout>

                    <table name="SiteMap" />

                </layout>

                <data>

                    <SiteMap>

    <row Position="72" Title="Warehouse"  Url="~/Frames/Default.aspx"  … more

  • How to make yourself as Administrator in Acumatica with SQL

    Hello everybody,

    today I want to share some piece of SQL code that can help you to add yourself to Administrators group in Acumatica:

    INSERT INTO [dbo].[UsersInRoles]

               ([CompanyID]

             ,[Username]

             ,[Rolename]

             ,[ApplicationName]

             ,[CompanyMask]

             ,[CreatedByID]

             ,[CreatedByScreenID]

             ,[CreatedDateTime]

             ,[LastModifiedByID]

             ,[LastModifiedByScreenID]

             ,[LastModifiedDateTime])

       VALUES

               (2

             ,'yourAccountName'

             ,'Administrator'

             ,'/'

             ,0xAA

             ,'B5344897-037E-4D58-B5C3-1BDFD0F47BF9'

             ,'00000000'

             ,'2010-07-27 17:25:00.000' … more

  • How to validate input on Insert

    Hello everybody,

    today I want to document small feature in Acumatica which I can call validation of insert. 

    As usually if you need to validate some logic of insertion you can use something like RowXXXXd event. But for simple validations you can use PXUIVerify attribute. Below goes example take from Acumatica itself:

    [PXUIVerify(typeof (Where<LandedCostTran.curyLCAmount, NotEqual<decimal0>>), PXErrorLevel.Error, "The value must be greater than zero", new System.Type[] {}, CheckOnInserted = false)]

    What this command says to you is pretty obvious:

    Verify at ui level ( generate javascript verification code ) that value at LandedCostTran.CuryLCAmount is not equal to zero.  … more

  • One more example of selectors

    Hello everybody,

    today I want to present one more example of selectors, but the one, that has multiple fields in it. 

    Consider following code:

    using System;

    using System.Collections;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using System.Threading.Tasks;

    using PX.Data;

    using PX.Objects.CS;

    using PX.Objects.CT;

    using PX.Objects.DR;

    namespace MyBlog

    {

    public class DeliverySelectorAttribute : PXCustomSelectorAttribute

    {

    public DeliverySelectorAttribute(Type selectorField, params System.Type[] fieldList)

    : base(selectorField, fieldList)

    {

    }

    public override void FieldVerifying(PXCache … more

  • How pageSource in Acumatica works

    Hello everybody,

    recently I was asked by one friends of mine, how pageSource in Acumatica works, i.e. how to code/decode pagesource contents. 

    After different methods of trial and error I've created following C# code in order to code/decode pageSource:

    Snippet

    private static string Compress(string src)

            {

                if (src.IsNullOrEmpty())

                {

                    return null;

                }

                byte[] bytes = Encoding.UTF8.GetBytes(src);

                using (MemoryStream stream = new MemoryStream())

                {

                    using (DeflateStream stream2 = new DeflateStream(stream, CompressionMode.Compress))

                    {

                        stream2. … more

  • How to make grid to locate all available space

    Hello everybody,

    toda I want to document one simple how-to issue. Recently I've spent some time in figuring how to make grid to locate all available space.

    Below goes how to make it:

    <AutoSize Container="Window" Enabled="True" MinHeight="400" />

    You can add it somewhere before end of px:PXGrid tag. For example like this:

          <AutoSize Container="Window" Enabled="True" MinHeight="400" /> </px:PXGrid>

    more

  • How to add redirect to grid in Acumatica

    Hello everybody,

    today I want to write a few words on how to add links to some entites in Acumatica.

    So, recently I've had an assignment to add redirect into existing grid, so intead of showing some text show nice link which will lead to Purchase order.

    Here is what I've done in order to achieve it.

    First of all I've noticed, what is primary DAC class in graph. It was VendFilt. 

    Then following steps were needed:

    create code for button:

    Snippet

    public PXAction<VendFilt> gotoPOOrder;

    [PXButton(Tooltip = "Open Purchase order")]

    [PXUIField(DisplayName = "Open PO")]

    public virtual void GotoPOOrder()

    {

        var poOrdEntryGraph = PXGraph.CreateInstance<POOrderEntry>();

        var  … more

  • PXSplitter basic template for autosize grid in Acumatica

    Hello everybody,

    today I want to write a few words about UI in Acumatica and if to be more precise about combination of splitter with other UI controls.

    As you maybe know, in order to allow user to modify height of input control, splitter conrol should be used.

    For now I found following configuration of splitter useful: 

    Snippet

    <px:PXSplitContainer runat="server" ID="PXSplitContainer" Height="100%" Width="100%" Panel1MinSize="120" Panel2MinSize="120" 

        SplitterPosition="210" Size="3" SkinID="Transparent" Orientation="Horizontal">

        <AutoSize Enabled="true" Container="Window" MinHeight="300" MinWidth="100" />

        <ContentLayout AutoSizeControls="True" Orientation="Horizontal" /> … more

  • Two kinds of buttons in Acumatica

    Hello everybody,

    today I want to write a few words about two types of buttons in Acumatica.

    usual form of declaration

    unusual form of declaration

    What is difference from code prospecitve?

    In the begining they are equal:

    public PXAction<Shipment> CancelShipment; 

    Even very similar with attributes:

    1. 

             [PXButton(CommitChanges = true)]

             [PXUIField(DisplayName = "Cancel Shipment")] 

    2. 

            [PXButton]

            [PXUIField(DisplayName = "Release")] 

    But different with declaration:

    protected virtual void cancelShipment() 

    protected virtual IEnumerable release(PXAdapter adapter) 

    and different with last statement. Those with PXAdaapter should return … more

  • How to start with Acumatica development

    Hello everybody,

    this post is intended for those people who want to make development for Acumatica, but don't know where to start or how to start. Or for those, who know C#, but absolutely can't figure out how to work with Acumatica.

    So, first of all, I'll describe some general ideas, and then provide few examples of how development for Acumatica is done.

    Acumatica has the following development or extension schema.

    Acumtica is installed on some IIS server. Further in this document I'll name it production instance or production.

    Developer installs Acumatica on hiw working computer with IIS. Without IIS development for Acumatica will not be possible

    Developer creates his extensions … more

  • Three grids in Acumatica

     Recently I've posted following question on stackoverflow:

    I have following request from my customer to be implemented in Acumatica:

    Create form which have input fields on top.

    Form should have first grid, which reacts on parameters on top

    Form should have second grid, which reacts on top parameters and grid 1.

    Form should have third grid, which reacts on top parameters and grid 1 and 2. Acumatica has following master templates: Form2Detail.master, FormDetail.master, FormTab.master, FormView.master, ListView.master, TabDetail.master, Workspace.master. But there is nothing like Form3Detail.master. Also three grids are not available in T200, T300 manuals of Acumatica. So, my … more

  • Customization internals Part 2

    Hello everybody,

    today I want to continue few more details about customization internals. In one of my long time ago posts I've described how to create customization file by yourself without Acumatica engine. 

    Today I want a bit extend my comment with few more details.

    Quite often it is needed to add sql code to your customization. How to do it? Acumatica customizations allows it with usage of projext.xml file. 

    Take a loot at following example:

    <Customization level="0" description=""> <File AppRelativePath="Bin\Blablabla.Acumatica.dll" FileID="d701b330-7c72-4f51-b1ae-75c4e2c02194" /> <File AppRelativePath="Pages\AP\AP306010.aspx" FileID="b9e88968-7f36-4cfc-9383-caed8363c269" /> < … more

  • How to show smart tag in visual studio 2015 for data source in Acumatica

    Hello everybody,

    today I want to share simple trick of how to show smart tag at DataSource control in Acumatica. Recently I had to generate class, and for my disappointment I wasn't able to get window that can generate class for me. So, in order to get that window, following steps are needed:

    1. Go to design mode

    2. In properties window select ds

    3. Press Show Smart Tag keyboard combination - [Shift]+[Alt]+[F10]

    4. Choose anything what you need.

    more

  • PXFilter set up fields only once

    Hello everybody,

    today I want to document in my blog interesting behavior of PXFilter in Acumatica. 

    First of all, few words about it's behavior. If Acumatica sees PXFilter, it will create single record, which will remain only in cache and never will travel to the db. Recently I faced interesting issue, fields from PXFilter DAC object was updated only once. After deep investigation I've found that it is because anything that works with PXFilter shouldn't have any field marked as IsKey. If field is marked as IsKey, it will not be updated after each modification of UI. more

  • New web services features in Acumatica

    Hello everybody,

    today I want to share with you one way of importing data from Acumatica. 

    After many versions of binding to strings Acumatica made really big change in their web service decisions. They made their services more compile time oriented. 

    Adding new web service reference should be done only in the following way:

    1. In  the menu select Project -> Add Service reference

    2. In the Pop up type something like "https://localhost/WebServiceAPITest/entity/Default/5.30.001?wsdl" without quotes.   

    3. Click Go

    4. Here you can feel some freedom, and give namespace which you prefer for your web services.

    5. Click Ok.

     

    Here I want to post way how to get all Stock items with … more

  • Summary of my Acumatica certification

    Hello everybody,

    recently I was asked about my level of knowledge in Acumatica.

    Here I want to make short summary of my Acumatica certificates:

    T100:

    T101  :

    T200:

    T300:

    T900:

    S400:

    Below also goes pdf editions of my certificates ( which I downloaded from acumaticauniversity.com ):

    T900 T101 T100 S400 T300 T200 more

  • How to set current record in Acumatica

    Hello everybody,

    today I want to share one trick which can save you few lines of code.

    Imagine case: you created graph, and want to read something from db, and then set current property of that graph view to some value. How to do it in one line? The anser is simple, with help of Search<>

    For example it can be like this:

    public PXSelectOrderBy<SalesOrder, OrderBy<Asc<SalesOrder.orderNbr>>> Orders;

    ...

    graph.Orders.Current = graph.Orders.Search<SalesOrder.orderNbr>(order.OrderNbr); more

  • How to filter add some info to filter

    Hello everybody.

    Today I want to share notice of how to work with processing screens.

    But of course not in very standard situation. One of my clients requested me the following: he wanted at processing screen to select some items in screen in part 1, then monitor 

    results in part two, and see some totals in part three. 

    As you understand it's not easy to ahcieve this goal only with help of selectors. It is possible with usage of delegates in Acumatica and with usage of it's cache.

    Initial initialization of page was the following:

    [Serializable]

    public class RRCashRequestProcessor : PXGraph<RRCashRequestProcessor>

    {

    public PXCancel<CreatePaymentFilter> Cancel; … more

  • How to work with selector

    Hello everybody,

    today I want to write few words how to work with selectors in Acumatica.

    So, imagine, you have the following selector in Acumatica:

    <px:PXSelector ID="NmbUsrBillPMTask" runat="server" DataField="UsrBillPMTask"/>

    In order to make it work as selector, you need to do the following:

    [PXSelector(typeof(Search<PMTask.taskID>))]

    if you'll do it, you'll receive following selector:

    And if you choose there some value, you'll be able to see id represented as number. In my case it was 727.

    But what if you want to make it more readable?

    Then you can add following part:

    [PXSelector(typeof(Search<PMTask.taskID>), SubstituteKey = typeof(PMTask.taskCD))]

    Then instead of … more