Solved

How read and use latest currency rate from Sales Order Entry Graph

  • 7 November 2023
  • 1 reply
  • 38 views

Userlevel 1

I am new to Acumatica customization and have a Graph extension of the Sales order screen. I want to be able to read the latest currency rate when i click a custom action button.

public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>
  {
        public PXAction<SOOrder> addItems;
        [PXButton(CommitChanges = true)]
        [PXUIField(DisplayName = "Add License Items", Enabled = true)]

        protected virtual IEnumerable AddItems(PXAdapter adapter)
           
        {
                  
            var rowCount = Base.Transactions.Select().Count;
            var curInfoID = Base.Document.Current.CuryInfoID;
            var curRate = ????

I want to create a variable of currency rate everytime the document currency is change
 

icon

Best answer by Vignesh Ponnusamy 7 November 2023, 21:50

View original

1 reply

Userlevel 7
Badge +4

Hi @fmrubi11,

You can use currencyinfo view like, var curRate = Base.currencyinfo.Current; to access the curreny information. 

 

 

Happy Coding.!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved