NAV 2015 Bug? TableRelation and Enabled with condition

HeinziTuberkelHeinziTuberkel Member Posts: 4
edited 2021-03-31 in NAV Three Tier
Recently I encountered a reproducable NAV 2015 client crash that took me a while to understand.

Table "A" contains a field "Ref B"(Code 20) that is used to reference Table "B". Therefore the Field "Ref B" has its property TableRelation to "Table B"."PK Field".

Page "Card A" uses table "A" as SourceTable.
An action "Show Card B" opens RunObject "Page Card B" with RunPageLink "PK Field"=FIELD("Ref B").

This works without problems.
Now I wanted to disable the Action as long as the Link to Table B is empty. So I added a check to the action's "Enabled" property:
"Ref B"<>''

From now on the NAV Client crashes (=closes without any notice) as soon as I try to open Page "Card A".

Everything works fine if i either
- remove the condition from Enabled in tha action or
- remove the TableRelation from Table "A"


Is this a known bug? Does it persist in newer NAV (or Dynamics) versions?
It there a workaround (aside from removing one or the other)? ;-)

Answers

  • KishormKishorm Member Posts: 921
    Create a boolean variable with IncludeInDataset https://docs.microsoft.com/en-us/dynamics-nav/includeindataset-property and then set this in OnAfterGetRecord and then use this boolean variable on the Editable property
  • HeinziTuberkelHeinziTuberkel Member Posts: 4
    Thanks for the suggestion, Kishorm.
    Unfortunately, this does ... once again ... not work for me because I only have the "Designer" licence, which allows me to add fields and properties but keeps me from adding code (and variables) into table or page objects.
Sign In or Register to comment.