Form Design Navision

david.weeks
Member Posts: 96
Hello All,
I have been given the task of allowing a user to add multiple comments against a sales quote line.
As we know, standard Navision only allows the user to add comments against the sales quote header.
Any ideas on how to approach this?
One idea is to add a field to the sales comment line - being sublineno.
Add this to the existing primary key for sales comment line.
I then add Comments to the Line button on the quote form.
What do I do then?
Call a new form directly?
Call a function that goes to the Quote Sub-Form and then opens a new comments form automatically?
If you think the second approach sounds good, how do I call such a function and what is the code to open a new form from c/al?
(I am new to all this but learning fast)
Thanks
I have been given the task of allowing a user to add multiple comments against a sales quote line.
As we know, standard Navision only allows the user to add comments against the sales quote header.
Any ideas on how to approach this?
One idea is to add a field to the sales comment line - being sublineno.
Add this to the existing primary key for sales comment line.
I then add Comments to the Line button on the quote form.
What do I do then?
Call a new form directly?
Call a function that goes to the Quote Sub-Form and then opens a new comments form automatically?
If you think the second approach sounds good, how do I call such a function and what is the code to open a new form from c/al?
(I am new to all this but learning fast)
Thanks
0
Comments
-
dude.... again.... wrong forum....
ok, very short and quick then.
Make a new tabel (or expand the existing one). Copy all field from the standard sales comment lines. Add a field Document Line No. below the Document no. field. Add this field to the key. NOT AT THE END, before Line no. Dont forget to set the property AutoSplitKey to yes on the new form.
Make a function in the salesline that opens the formsaleslinecommentline.setrange(...); form.runmodal(form::form50001,saleslinecommentline)
make a function on the subform of you sales document that calles the function in the table. Add rec. to the call when the function names are the same. else it will call itsself. call the function in the subform from the salesheader like this:
currform.subformname.form.functionname; (orsomethinglikeit)
this should do the trick....
please understand, if I spend two more minutes to this post I could have developed it my self... So that's why it a short and quick post
Although you are a beginner, these are not the best thing to start with, as you can see. It's not very diffecult, but you really have to some Navision knowledge to make these kind of things.
Good luck!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
Hi there,
I have solved the problem by creating a control button within the sales quote subform.
Within this subform, I have created two variables one that links to the new comments table and the other to the new comments form.
I have then created a temporary table (view) that links the subform (sales line) with the new comments form.
All seems to work fine once I have input the above code within the OnPush trigger.
One last question within this issue - how do I check if the date has already been input, and if not input by the user, how do I force a default of today to go in there. I did it before by using the SetUpNewLine function - but this doesnt work in this case.
I guess I need to use the onvalidate within the date field to check that a date has been input - but any code use says things like "you cannot compare a date with text".
Ideas?
Thanks0 -
Topic moved from "Navision Tips & Tricks".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