autorefresh form

karuchua
Member Posts: 151
how can i auto refresh a form upon running the form from modal.
0
Comments
-
Can you be more clear?
what exactly is your requirement?0 -
can i auto refresh a form that have run modallly.0
-
Can you give us some details about the following:
1. What form is this? - customized or standard?
2. What type of form is this?
3. Does this form have subforms in it?
4. How is the form opened? Is there any code getting automatically fired when the form opens / periodically?
5. Some more details (if you think that may help us suggest a solution)...
Chn0 -
ok, this is what i have done.
i have a report that am running,upon passing the filters to the report, its opens the form modally see the code below.IF GSuggestPrices THEN BEGIN Window.OPEN('Processing #1########## \' + '@2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' ); FnCheckItemLE; TempItemsREC.SETCURRENTKEY(TempItemsREC.Make,TempItemsREC.Model,TempItemsREC.Category); TempItemsREC.COPYFILTERS(Item); [b] FORM.RUNMODAL(FORM::"Inventory With Zero Movement",TempItemsREC);[/b] CurrReport.QUIT; END; CLEAR(GNo);
upon opening this form with the details i have filtered i want to view, in the header of the form i have field known as percentage , here i enter the percentage value i want,then it modifies on my fields,lets call it unit price by that percentage value.
the problem is that when i pass this value the field am modifying doesn't auto refresh until i close the form and open it again.
i want once i pass the value,that field is refreshed automatically with my new value.
in the form i have set autoupdate properties to yes,autotimer but none is working,even on modify trigger of the form but to no avail0 -
After you modify the record in the code, did you try CurrForm.UPDATECONTROLS?
If the code which is modifying the record is written inside the form, this method should work fine. Let us know whether this works for you?
Chn0 -
i have tried that but still doesn't work0
-
That's quite odd. You can also try using CurrForm.SAVERECORD before the updatecontrols, but that's it, nothing else is coming to my mind now to refresh the records on a form. Let's see if we get anymore ideas here.
Chn0 -
anyone else with any other idea on how to go about this.0
-
You say in the header of the form is the textbox with the percentage.
Does that mean your form has a subform?
If that is the case, refresh the subform...
BTW you say that after you edit the percentage. it triggers an update on the records.
What happens when you enter the wrong percentage? can a user easily edit the percentage over and over without losing the initial values of the records?
This I ask because when you add for example 7% it is not the same as subtracting 7%, and mistakes are hard to undo.0 -
in the header is where i have the percentage which am passing to the form which is just one form,no subform.
yes the user can modify the percentage over and over again,coz the field we are modifying is not that critical ,its just for analysis purposes.0 -
so you're entering a "percentage" into a field and it's not updating the corresponding field "unit price by that percentage value" can you show us the code that's OnValidate of your "percentage" field?
IS your code on the form or on the table?0 -
the form
LItemREC.SETRANGE(Category,Category); IF LItemREC.FINDSET THEN BEGIN LCount := LItemREC.COUNT; LWindow.OPEN('Calculating New Disposal Selling Price ########1# \'+ 'Item #########3# : #########4# \\Progress Update @5@@@@@@@@@'); LWindow.UPDATE(1,Category); //LWindow.UPDATE(2,"Vendor No."); REPEAT LWindow.UPDATE(3,LItemREC."No."); LWindow.UPDATE(4,LItemREC.Description); LItemREC."Suggested Disposal Price" := ROUND(LItemREC."Unit Price" * (1 + (GPercent/100))); LItemREC.MODIFY; LWindow.UPDATE(5, LItemREC."Suggested Disposal Price"); UNTIL LItemREC.NEXT = 0; END;
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions