Hi All, Few months ago I was conducting a specialized training for About IT partner of Acumatica in South Africa. We have discussed many things like: development, issues investigation, implementation projects, internal ERP usage and many others. Here I want to share with you three interviews we recorded as part as these activities. Feel free to request Acumatica to provide training for whether you need it. Acumatica team will be happy to work with you on agenda and your questions.
Category: Sergey Marenich
Prevent SO Invoice from Posting Inventory
Hi All, A quick customization tip for you – if you need to cut Inventory posting from SO Invoice you can just simple override PostInvoice and don’t call the base method.In this case Invoice will be successfully released, but inventory transaction will be totally ignored. This customization might be important in some cases and have an easy customization!
Accounting Basics for Developers
Hi All, Long time ago, one my good friend explained me the accounting principles in 30 minutes in a way where I (a system developer, that time) understood it and never forget anymore. This knowledge serves me for a more than 5 years now and I promised myself to share this knowledge with every one how needs. So here it is – Accounting basics for developers.I’ll focus on accounts, account types and general ledger to explain where it is coming from and why it is like this. I guess you’ll understand how to use it after that! Part 1 – Owner is a Core Historically wise, everything has started from… Read more
Primary & Foreign Keys
Hi Everyone, Acumatica is a advanced ERP system. And when we speak about ERP it is not only about data input, it also about how to store, retrieve and analyze data we have. Because of this we have very connected tables in Acumatica databas where almost every 3rd-4th column is a foreign key to other record. This helps a lot with data analyses.But how to organize keys better for usage, faster for search and smaller for database storage? Primary/Foreign Keys Definition In general we have only 2 ways to define and organize keys: Natural Keys and Surrogate Keys. Each way has own benefits. Natural keys (Code, CD)A natural key is… Read more
Use Acumatica xRP Platform from Console App
Hi All, Did you know that it is not necessary to have a Web Site under IIS to get benefits from Acumatica Platform? You actually can run Acumatica platform even from console app! To do this you just simple do following: Create Console Application in Visual Studio Add references to (PX.Common.dll, PX.Data.dll, PX.Objects.dll) Copy web.config from Acumatica site to app.config of your console application Specify user and company using PXLoginScope Use Acumatica Platform as normally you do that. Here you can find a code example followed by some comments: App.config file is required to Acumatica platform to get proper environment configurations, database connection and other settings. For experiments you can… Read more
Cash Discount Customization
Hi Everyone, Today want to share with you a ways to customize cash discount calculation in AP and AR. The main payer there is a TermsAttribute, that does all required discount calculations. It is linked to fields it need through parameters in constructor: ARInvoice.docDate – input – date of the document ARInvoice.dueDate – output – due data of the document ARInvoice.discDate – output – data where discount is applicable ARInvoice.curyOrigDocAmt – input – total document amt from where discount will be calculated ARInvoice.curyOrigDiscAmt – output – end discount value As there values are configurable it very easy to replace its calculations using customization framework and use different values as a… Read more
Concurrent Update
HI All, With current web applications architecture it is complicated to track what users are doing on browser side: are they still online or on the way to take a cup of coffee? Will they save a record or just checking it?We can’t just lock records in the Web Application every time when someone have opened it for editing.So here we have 2 main problems: You don’t know who and when will save it You don’t know if user still online or not In Acumatica we have designed the platform in the way to not depend on user behavior. But we still have 2 different ways to manage concurrent update… Read more
Team Structure and Features Work
Hi Everyone, I would like to speak a bit about team development and would like to share a bit of experience of how Acumatica organize development teams. Actually within Acumatica history I really saw how company was changing from unstructured extreme programming to real and organized scrum. This was a long path full of mistakes and success. And I think this experience is worth to share. Here are few ideas to you. Acumatica team is one, solid team where 4 different types of employees are involved. This is important in terms of responsibilities for feature. Team owns the feature and should really focus all resources to deliver it on time.Here… Read more
Dynamic API Endpoint URL
Hi All,Sometimes you may need to dynamically change the URL of the API endpoint. In these cases standard way with putting URL in app.config file does now work properly, so we need another way. Here I want to share with you one of the good options that I used in some API integrations here URL needs to be configured in the sessions screen: This approach also helped me previously to solve issue “Could not find endpoint element with name ‘<Name>’ and Contract ‘<Name>’ in the ServiceModel client configuration section. …” In general this error can be solved by copying app.config file with dll or embedding configurations, but it is much… Read more
Extend Tax Calculation Precision
Hi All, A while ago I got a question about extract from document tax calculations in Acumatica. In Thailand there is requirement by law to calculate tax from Document Amount, however in Acumatica we have only option to extract tax from item amount. However this calculation is not aways correct due to rounding differences between line amounts and document amount. For example if you have 7% tax and 3 lines (47000, 18000, 9000) with total 74000 than: If you calc taxes from each line and sum it than you get Taxable Amt = 69,158.87, Tax Amt = 4,841.13 If we calc if using excel (Amt – Amt*1.07), than Taxable Amt… Read more
Tenant Selector In Acumatica
Hi All, Quick trick for you. If you need to link several tenants together, you can use the code from this article Tenant selector attribute: #region NeuralCompanySelectorAttribute public class CompanySelectorAttribute : PXCustomSelectorAttribute { public CompanySelectorAttribute() : base(typeof(UPCompany.companyID)) { DescriptionField = typeof(UPCompany.loginName); } protected virtual IEnumerable GetRecords() { PXCache cache = _Graph.Caches[typeof(UPCompany)]; Int32 current = PX.Data.Update.PXInstanceHelper.CurrentCompany; foreach (UPCompany info in PXCompanyHelper.SelectCompanies(PXCompanySelectOptions.Visible)) { if (current != info.CompanyID) yield return info; } } public override void DescriptionFieldSelecting(PXCache sender, PXFieldSelectingEventArgs e, string alias) { if (e.Row == null || (sender.GetValue(e.Row, _FieldOrdinal) == null)) base.DescriptionFieldSelecting(sender, e, alias); else { UPCompany item = null; Object value = sender.GetValue(e.Row, _FieldOrdinal); Int32 key = (Int32)value; foreach (UPCompany info… Read more
Put Document on Hold with Code
Hi All May Acumatica documents have an imbedded workflow. Hold/Unhold is usually a part of this worflow. Sometimes we may want to emulate user behavior thought the code, but there is a trick here. Acumatica’s Hold checkbox usually adds a hidden button that is triggered automatically when you check/uncheck hold. When you work thought the code you need to consider it and call button as well. Here is example on how to call hold on Purchase Order: public PXAction<POOrder> PutOnHold; [PXButton()] [PXUIField(DisplayName = “Put On Hold”)] public void putOnHold() { POOrder row = Base.Document.Current; if (row != null) { //row.Status = POOrderStatus.Hold; row.Hold = true; row = Base.Document.Update(row); Base.hold.Press(); }… Read more
Dashboards based on Real Screen
Hi All, You may know that it is easy to do a dashboard in Acumatica based on Generic Inquiry. But you also can enable your custom real screen to be a dashboard source. To do this you actually need only 3 things: Mark your Graph as dashboard source: [PX.Objects.GL.TableAndChartDashboardType] Mark you Data View as Filterable: [PXFilterable] Add a Data View delegate. For some reason dashboard does not work without it. I hope this issue will be solved soon. Full code source: using System; using System.Collections; using System.Collections.Generic; using PX.Data; using PX.Objects.AR; namespace CUrrentBranch { [PX.Objects.GL.TableAndChartDashboardType] public class CurrentBranchInvoices : PXGraph<CurrentBranchInvoices> { public PXCancel<ARInvoice> Cancel; [PXFilterable] public PXSelect<ARInvoice> MasterView; public virtual… Read more
Depersonalize Acumatica Database
Hi All, If you need to give an Acumatica Database to someone but if you care about data privasy, you may a way to crear some sensetive data from the database. Here I want to share with you a script example that creares and depersonalise some of private information from database: View the code on Gist. Basicall this script resets all passwords, clears all contact and address details, remove files attached. Feel free to improve and extend it for other objects. Hope it helps!
Get Current Company Name
Hi All, Want to give you a short trick – how to extract company name from the currently logged in user: Company Name PX.Data.PXLogin.ExtractCompany(PX.Common.PXContext.PXIdentity.IdentityName) Here we have 2 things: PXSessionContext (PXContext.PXIdentity) – System class that stores environment variables in session like User, TimeZone, Branch, Locale. Actually this is used for user authentication authorization. However user here is stored with a full notation – like “user@company:branch”. But we can cut a part of it using special rules. PXLogin – set of tools that can help to login user and use username. In our case it can extract company name right from full identity name. Company ID PX.Data.Update.PXInstanceHelper.CurrentCompany Here we have an… Read more
Generic Inquiry with Filtering by Current Branch
Hi All, Want to show you an option how can you filter documents in Generic Inquiry by currently selected branch. In reports you have an option to use AccessInfo.BranchID, but in generic inquiries unfortunately such option is not available. You also can’t join this table as AccessInfor is virtual table that does not exist in database. However there is a workaround – we create a parameter in GI, that will get a default value from any branch field in Acumatica that has a default value from current branch and than use this filter for filtering. Let me guide you: We need to create a parameter that will store a current… Read more
Reporting Currency Conversion on the Fly
Hi All, In Acumatica you can use standard currency translation tool to translate base currency to any other reporting currency. However this process is available only for GL Balances. You can really translate AP/AP SO/PO balances and total using the same approach. Here I want to give you the idea of how can you do on the fly currency translation from any currency to any currency on any document in Acumatica for reporting purposes. Problem The biggest problem of this task are Rates. In Acumatica we store rates assigned to effective date. But if you have other dates where are no rates defined, we need to user the closest previous… Read more
Override Action – Confirmation Dialog
Hi Everyone, Want to give you an example of how to modify an action in Acumatica. specifically I’ll customize a Release action on Payments and Applications with adding a Confirmation Dialog with conditions. To customize an action we should follow the Acumatica customization guide. In simple words we should do following: Find the original action. Create a graph extension. Redefine the original action with the same parameters. Add own logic in the new action. Call base action code. Base Action Code To find the original Action you can use Source Code browser. Custom Code Your code will be called instead of the base action. You can put your custom code… Read more
Emails Processing for Case Management.
Hi Everyone, Want to share a emails webinar done by our services team in Asia. Please find demo flow charts here with the best quality: Initial Email Processing: Emails Forwarding: Have a nice day!
Dynamic Drop-Down Control
Hi Everyone, Usually Acumatica Drop-Down controls have fixed lists of values. Of course you can use PXStringListAttribute.SetList<…>(…) method do change list of values dynamically, but how to make it more handy. The way I recommend you is to create an attribute that can encapsulate all the field related logic, so to use it you can just put the attribute on the proper place. So the plan: Create an attribute that will be inherited from PXStringList and provide the values Create IPrefetchable class that can be automatically load all possible list from DB and cache it. In the same time Acumatica will auto-reset when the linked table is changed. This is… Read more