Skip to main content
Solved

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

  • November 7, 2023
  • 1 reply
  • 66 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.!

View original
Did this topic help you find an answer to your question?

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.!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings