Problem: Refresh Form with Empty SourceTableTemporary

Hi,
I have a Card-Type Form with SourceTableTemporary = Yes. The form start with empty data, I want before select filters (variables) and after push a Button to fill the SourceTemporaryTable.
I run the Form and select filters then if I active (click on) another opened window on the client and I return on my form the filters (variables) become Blank but if I click on the textbox the value is visible. It’s a bug of refresh as calls OnNewRecord Trigger when activate the form. This happens only if SourceTableTemporary is empty.

I use Dynamics NAV 2009 SP1 with last build 30929.
This happen even in Cronus, with fin.exe and finsql.exe client.

Tnx

It doesn’t do that for me.

I’ve created a form, set SourceTableTemporary to yes, created a variable and a textbox/label to show it on the form. I enter text in the textbox for my variable and no matter what I do, as long as I don’t close the form, when I come back to the form my text in the variable is still there. Even after I click the button which uses the text as a field filter to put records in the temp table, my text stays in the variable. What code do you have in the form?

I’m sorry… set InsertAllowed and DeleteAllowed to No.

I did that, but still no change. Here’s my form…

OBJECT Form 50000 test
{
OBJECT-PROPERTIES
{
Date=07/14/10;
Time=[ 2:28:41 PM];
Modified=Yes;
Version List=;
}
PROPERTIES
{
Width=9790;
Height=6490;
ActiveControlOnOpen=1000000001;
InsertAllowed=No;
DeleteAllowed=No;
SourceTable=Table27;
SourceTableTemporary=Yes;
}
CONTROLS
{
{ 1000000000;TabControl;220;220 ;9350 ;5280 ;HorzGlue=Both;
VertGlue=Both;
PageNamesML=ENU=General }
{ 1000000001;TextBox;3850 ;1100 ;5060 ;440 ;ParentControl=1000000000;
InPage=0;
CaptionML=ENU=Item No. Filter;
SourceExpr=NoFilter }
{ 1000000002;Label ;440 ;1100 ;3300 ;440 ;ParentControl=1000000001 }
{ 1000000003;TextBox;3850 ;1760 ;2750 ;440 ;ParentControl=1000000000;
InPage=0;
SourceExpr=“No.” }
{ 1000000004;Label ;440 ;1760 ;3300 ;440 ;ParentControl=1000000003 }
{ 1000000005;TextBox;3850 ;2310 ;5500 ;440 ;ParentControl=1000000000;
InPage=0;
SourceExpr=Description }
{ 1000000006;Label ;440 ;2310 ;3300 ;440 ;ParentControl=1000000005 }
{ 1000000007;TextBox;3850 ;2860 ;2750 ;440 ;ParentControl=1000000000;
InPage=0;
SourceExpr=“Search Description” }
{ 1000000008;Label ;440 ;2860 ;3300 ;440 ;ParentControl=1000000007 }
{ 1000000010;TextBox;3850 ;3410 ;5500 ;440 ;ParentControl=1000000000;
InPage=0;
SourceExpr=“Description 2” }
{ 1000000011;Label ;440 ;3410 ;3300 ;440 ;ParentControl=1000000010 }
{ 1000000009;CommandButton;7370;5720;2200;550;
HorzGlue=Right;
VertGlue=Bottom;
PushAction=FormHelp }
{ 1000000012;CommandButton;2640;5720;2200;550;
CaptionML=ENU=Fill Temp Table;
OnPush=BEGIN
Item.SETFILTER(“No.”, NoFilter);
IF Item.FINDFIRST THEN
REPEAT
COPY(Item);
INSERT;
UNTIL Item.NEXT = 0;
END;
}
}
CODE
{
VAR
NoFilter@1000000000 : Text[60];
Item@1000000001 : Record 27;

BEGIN
END.
}
}

What’s your Nav 2009 version? Remove button from your form, the tempteble must be empty. Try again so:open form, insert values into 2 textbox, click on another opened window and then click on test form.

NAV 2009 SP1 (6.00.29626)

7217.NAV2009Version.gif

No change…

I deleted the command button:

{ 1000000012;CommandButton;2640;5720;2200;550;
CaptionML=ENU=Fill Temp Table;
OnPush=BEGIN
Item.SETFILTER(“No.”, NoFilter);
IF Item.FINDFIRST THEN
REPEAT
COPY(Item);
INSERT;
UNTIL Item.NEXT = 0;
END;
}

I ran a form, then ran the test form, entered data in the textbox for the variable, clicked on the previously opened form, opened a new form, clicked back on the first form I opened, then clicked on the test form, still the data I typed into the textbox for the variable was still showing there. I can’t get it to break.

7217.NAV2009Version.gif

OK, with your version I haven’t this problem. I’m srry but the problem appeard after upgrading to 30711 and now with last build 30929.

For updates list click here

Tnx for your time :wink:

Terribly sorry I disregarded the build. Just didn’t think it would make that big of a difference.

Thanks for pointing me to Waldo’s list. To everyone else, this is worth browsing to and saving in your favorites…

Waldo’s Blog: Platform updates overview - 3.70.B - NAV2009 SP1 (UPDATED 4)