Skip to main content
Answer

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

  • November 7, 2023
  • 1 reply
  • 85 views

Forum|alt.badge.img

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
 

Best answer by Vignesh Ponnusamy

Hi @fmrubi11,

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

 

 

Happy Coding.!

1 reply

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @fmrubi11,

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

 

 

Happy Coding.!