Skip to main content
Solved

Variable value is changing when other variables assigned value changes

  • April 23, 2022
  • 1 reply
  • 44 views

aaghaei
Captain II
Forum|alt.badge.img+10

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

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

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

1 reply

aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • 1202 replies
  • Answer
  • April 25, 2022

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


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