In a form create with the form wizard. Witch code is automatically generated ?
A: Validate(“No.”) in onaftergetrecord
B: SETRANGE(“No.”) in onaftergetrecord
C: FORM.Save() in onDeleterecord()
???? in onNewRecord
I can not find answer to this question anywhere.
Please help [-o<
Comments
RIS Plus, LLC
I do create a card form with form wizard and it donesn't generate any code for the form by default.
the question is actually to ask what standard code you should write rather than automatically generate from form wizard.
RIS Plus, LLC
I have read so many books and could not find this any where.
Where did you find this answer?
I don't remember reading it anywhere.
As far as I know it is only at master data tables like customers, vendors and items.
It is not on the sales order card /production order card etc.
Most of these answers are right in the application, all you need to do is look around for them. What prompted me to search around was a customer that wasn't able to keep a filter on the No field, and that's how I discovered this particular thing. With this question I would have done the same thing, I would have opened a card form to take a look around. The only one in there is number B. Then I'd have opened 10 more Card forms just to make sure.
The best way to learn these things is not to try to find it in any book, but by trying it yourself. Create a new database just for yourself and screw around in it as much as you want.
RIS Plus, LLC
I've also tried to make card forms without luck to generate the code.
I also tried the Customer database as source table.
If you open the code in other card forms like form 21 Customer Card then you se SETRANGE("No.") in the OnAfterGetRecord.
But in the Dev II Training Manual from MSBS it says this in designing a Card form :
Solution: Enter the following code in the Form - OnAfterGetRecord trigger:
SETRANGE("No.");
Why insert a code witch should be automatic inserted?
In several places I have seen VALIDATE("No.") as the right answere...
I don't see this code either, but could it be a code witch is not possible to remove? I am confused. I exported one form as txt, but could not see the code there either. Until I hear another thing, I might think SETRANGE("No.") is correct since it has been said i in solution training.
Another Question :
46) you are posting a journal. What are dimensions that are used?
a) journal
b) ledger
c) default
Is it A?
Opened the Jnl.-PostLine codeunit, and it uses the Journal Line Dimension record.
I am still in doubt over the automatic added code.
Validate("No.") is used to call the OnValidate trigger of the field, so this seems to be wrong.
It seems like an trick question. Also a bit frustated that they could ask this question in exam.
RIS Plus, LLC
Maybee this was a fact in earlier versions. In my Navision no code is automatically generated.
It is a tricky question if no answere is correct, though.
It might be the right answere for the exam, but not in the real world.
I would be thankful if you could get this blur away from my brain and convince me this also happeneds in ver 4.0.
Never has been.
Anyway, the purpose of this forum is to learn, and by now you should know everything there is to know about what the form wizard does, so any question about that topic should be easy for you now .
RIS Plus, LLC