Set parameter in table

RoelofRoelof Member Posts: 376
I am trying to transfer a variable as a parameter to a table that is used in a sub page. Here is the scenario:
- Created 2 actions to turn on/off a software switch as a boolean on the Sales Order (header action)
- These 2 actions (on/off) are calling a function on the Sales Order sub-page, which is setting the same boolean switch through a function on the Sales Line table. This Sales Line table entity suppose to be same entity as on the SubPage (no other SalesLine table entity used).
- This switch boolean is used in "sales Line".field_X. to skip some field validation logic.
- However,when I run the Sales Order page and update field X on the sub page, the debugger is showing that the switch is never been set.

Any idea what is wrong?
Roelof de Jong


  • RoelofRoelof Member Posts: 376
    Forgot to mention: This is BC14.
    Roelof de Jong
  • vaprogvaprog Member Posts: 1,067
    Hi Roelof

    It's been some while since I tried to control some aspect using a global variable in the Rec variable of a page. I gave up after it looked like the value of my variable came and went away apparently randomly, as if the page used a couple of Rec variables, switching them at any time. I don't remember, what it was exactly, I wanted to achieve, and what version of NAV was involved, not even if it was indeed pages, or still forms, but it was impressive enough to never try this again.

    Unless someone has mastered this successfully, and tells you how, I suggest you try a different approach, such as a variable on the subpage itself.
  • RoelofRoelof Member Posts: 376
    Thanks for the reply. Yeah I came across a wall it looks like it. I was able to fix the issue by using a record field and use that as a soft-switch. But it's kinda odd that it doesn't work the way I had in mind.
    Roelof de Jong
  • PascualPascual Member Posts: 9
    edited 2022-05-25
    Hi, since you don't know what you want to control and if you are using BC14 in CSIDE or in AL with extensions.
Sign In or Register to comment.