help please...messed up a form

Trint
Member Posts: 44
i'm a vs.net programmer. however, my boss wanted me to see if i could fix a navision program. we have several customers using navision, so i thought i would use what looked like an exact form to fix another database...i went to:
sales & receivables
orders
did object designer
selected form 573 and copied it...deleted the one in the other database and pasted the new 573 in its place...
now when i go to orders and select a new sell-to customer, and hit tab, i get this same little virticle screen...but when i select 'balance amount' or 'overdue amount' i get this error message:
"the form does not recognize the control 1"....
can anyone help me??
thanks,
Trint
sales & receivables
orders
did object designer
selected form 573 and copied it...deleted the one in the other database and pasted the new 573 in its place...
now when i go to orders and select a new sell-to customer, and hit tab, i get this same little virticle screen...but when i select 'balance amount' or 'overdue amount' i get this error message:
"the form does not recognize the control 1"....
can anyone help me??
thanks,
Trint
0
Comments
-
Navision has something called subforms. This is a form displayed in another form. I think this is why you see the same things.
To solve the missing controle issue, complile the forms that you have imported (copied). Goto object designer, select the forms, hit F11.
If you don't know what form gives the error, compile all! Also compile all, if you're not quite know what you are doing. I second thought... compile all (no offence). Don't go compiling all objects (or only forms) when people are using the database. They will all get errors.
If you don't get an error after compiling, things should be ok. If you do (i think you will) fix'm. I think you have to open the object, compile it again (F11) and Navision will jump to the problem. I think you have a field in the form that does not exists in the table. Delete this field. Compile again, and again, and again till no errors occur.
Ooooooh, and tell you boss he isn't a smart man, putting a vs.net programmer to fix a problem in a live customer database.
Good luck man, I realy hope you can fix this shit!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
Well Trint....what to say...... if u r clever, i would think u might have saved the form before u deleted.If the answer is yes, import that back and try to srot it.Any errors we r here to help u.
Never import any objects from one customer database to another.This may overright the exixting functionality.And u need not delete the form if u want to import a new version.u can replace it instead.
Good luck.LR0 -
I have the same message. No subforms, no object import. Just a form with a lot of controls and code. Everything compiles Ok.
The objects that cause problem are just textboxes and frames. when i comment the code, that refers to them, problem disapears. The code is not a problem cause ANY reference to the control compiles well, but causes error on form view. (For example: message(format(currform.txtA.height));))
I think it's some internal error of Navision compiler.
I have anotrher funny example of such error:
EMPTY FORM with
NO CONTROLS,
NO VARIABLES,
NO FUNCTIONS,
NO TABLE RELATION.
It compiles OK, but returns error "The form does not recognize control 1000000"0 -
I bet you are trying to do something in the OnInitForm trigger (before the controls are created).
Change this code to the OnOpenForm trigger.Nelson Alberto0 -
Yeah, I had "on init" code "currform.editable(true)". Removed it and all worked perfectly. This line did not refered to any controls, so I did not mind.
Thanx a lot!
(But another case with empty form does not have any code at all)
0 -
nelson wrote:I bet you are trying to do something in the OnInitForm trigger (before the controls are created).
Change this code to the OnOpenForm trigger.
I have the same problem also. My code is even put in onCloseForm(). I have try to put in OnOpenForm, onAfterGetRecord, etc.
It still says it can't recognize the controlCurrForm.Description.Activate := TRUE;
Smile0 -
Why would you activate OnClose?
Maybe you can explain more what you are trying to do.
Thanks0 -
Eh... Nope that is not I want to do.
Actually, I want to disable editing the control at onOpenFormCurrForm.Description.EDITABLE = FALSE;
And make it editable again when some conditions are met when clicking button, etc.
I found out If I REMOVE this lineCurrForm.Editable = FALSE;
I have no problem anymore. Why?Smile0 -
hendri wrote:
CurrForm.Editable = FALSE;
I have no problem anymore. Why?
Just look at it.
Your making the form not editable with this code
For example we use this to make a price EDITABLE for only Internet orders. For manually entered orders prices are NOT editableOnAfterGetCurrRecord() CurrForm."Unit Price".EDITABLE("Internet Order");
0 -
Is it the navision's rule/behaviour that If I put this
onOpenForm() CurrForm.Editable = FALSE
so what ever controls I specify would not be recognized by the form?
By the way, I am a .NET/Java programmer, too. This behaviour really puzzles me a lot.
I think there must be certain reasons why controls are not recognized when I specifiy the code above. :-kSmile0
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