Variable value is changing when other variables assigned value changes

  • 23 April 2022
  • 1 reply

Userlevel 7
Badge +8

I have two variables (_approvalBase & _approvalLast) both of the same type but they should be keeping different values. But when I assign value to one, another one changes too. Why?

dialogData = RoutingPanelDialogData.Current;
EPApproval _approvalBase = SetApproval(Base, approvalBase, dialogData, EPStatuses.Approved, PXDBOperation.Update);
EPApproval _approvalLast = SetApproval(Base, approvalLast, dialogData, EPStatuses.Skipped, PXDBOperation.Insert);



Best answer by aaghaei 26 April 2022, 01:11

View original

1 reply

Userlevel 7
Badge +8

I figured it out. It was because .AskExt() in my scope. Since platform runs AskExt twice, any declared variables before the dialog, gets reassigned.


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