Form Design on Navision

Hello All, I have been given the task of developing a form that will allow the user to input multiple comments against individual sales lines on a sub-form. Currently, Navision only allows the user to input comments for the order as a whole i.e. the comments are order specific and not order line specific. I have tried a few things without success. Anyone got any ideas? Thanks, David

How about… Try extending the sales comment line table. add a sub-line no. field & include as part of the primary key On the Line menubutton, add an extra option for Comments & assign a short key - this should call a function from the sales line sub-form. The sub form function will need to set 3 filters to work properly - doc. type, doc. no., doc. line no. You will need to change the filtering at header level to only look at line 0 entries You will need to apply this to each type of sales document Also, check that the posting of the sale document & copy document work

Did you have a look at the item extended text functionality? This allows you to link text lines to item order lines. With a little modification you can even manually enter text order lines and link them with an existing item line. There is a field called “Attached to line no.” to establish this link.

I would recomend creating a new table (is “Sales Line Comment Line” redundant or what???[:p]). On this new table you can basically follow Simon’s advice. Changing the existing “Sales Comment Line” would make you run around like crazy changing Lookup and RunObject properties everywhere. And all this to keep finding missing places on the next few weeks/months…

Hello All, I have taken all the advice and tried to follow this design. Is this a good approach, and if so, what final touches do I need to shout Success from the roof tops? 1)Create new table to hold the Sales Quote Line comments. Call this: Quote Line Comments. I have added the additional field and made it a key as discussed. 2)Within the actual Sales Line table I have created a new function called [SalesLineCommentLine]. This uses the following code where 50081 is the new form that is used to add the quote line comments. saleslinecomment.SETRANGE(“Document Type”,“Document Type”); saleslinecomment.SETRANGE(“No.”, “No.”); saleslinecomment.SETRANGE(“Line No.”,“Line No.”); FORM.RUNMODAL(form::“50081”,saleslinecomment); 3)Within the subform (called Sales Quote Subform) I need to create another function that will call the function already created in the Sales Line table. [How do I call a function in a table from a new functin created in the subform?] 4) Within the Menu Button [Line] on the Sales Quote Form, add a menu item called comments. When clicked this should call the function on the subform that in turn calls the function in the table. Have I gone down the wrong road here or am I close? Thanks

David, You’re on the right lines… If you have created the function to display sales line comments in the sales line table then you should be able to see if from the symbol menu (F5) when designing the form based on the sales line table (the sub-form for the sales order main form.). You will see it if you select Rec,Functions in the first two columns of the symbol menu. On the subform object you should create a function and put the code that displays the comment form in there. Then design the main form and you should be able to call the function you just created by navigating through the symbol menu as follows… CurrForm,Controls,“subform control name”,Form, Functions, “Your function name”. To do this you need to make sure the subform control has a name property specified that you can pisk up in the symbol menu. If it doesn’t it will not appear there. The most logical place to put this code on the main form is with the other line related functions. ie… as an option on the “line” menu button control underneath the subform control. I hope this helps. Chris.

Hi Chris, In the end I took a different approach and created a command button within the actual quote subform. OnPush then uses SETRANGE, SETTABLEVIEW and RUNMODAL to force unique values into the new form I created (when it opens). All seems to work fine. My main problem with this approach first time round was the fact that when I tried to use PushAction and RunObject, I kept getting very strange messages telling me that I was trying to link with the Sales Header. “Apparently”, this is a bug with Navision and hence the reason for taking this approach. Thanks