Comment Lines and Option Type

Mauddib
Member Posts: 269
I put a new option in the Purch. Comment Line table. I added it to the end of the string for "Document Type".
I have a copy of the Purchase Header form and on this i added a button to open the Purch. Comment Line table form.
However when I look at the Table Filter (Ctrl + F7) on the comments the filter on Document Type does NOT match that of the Record on which i hit the button. The button is the same as the ones on the other forms like Purchase ORder, Purchase Invoice and so on.
Am I in some way meant to inform the form of the new option type? I would have thought the following on the button:
RunObject: Form Purch. Comment Sheet
RunFormLink: Document Type=FIELD(Document Type),No.=FIELD(No.)
would be enough? But it is picking up a different option for Document Type than the header I am looking at.
Gavin
I have a copy of the Purchase Header form and on this i added a button to open the Purch. Comment Line table form.
However when I look at the Table Filter (Ctrl + F7) on the comments the filter on Document Type does NOT match that of the Record on which i hit the button. The button is the same as the ones on the other forms like Purchase ORder, Purchase Invoice and so on.
Am I in some way meant to inform the form of the new option type? I would have thought the following on the button:
RunObject: Form Purch. Comment Sheet
RunFormLink: Document Type=FIELD(Document Type),No.=FIELD(No.)
would be enough? But it is picking up a different option for Document Type than the header I am looking at.
Gavin
0
Comments
-
First of all, when you add an option value to a standard Navisiont able, you should add a number of commas between the existing last one and your new option value. So if the existing option string is "quote,order,invoice" and you want to add muaddib at the end you should change it to "quote,order,invoice,,,,,,,muaddib" instead of "quote,order,invoice,muaddib". The reason is that MS might decide to add a few option values themselves, and by adding the commas in between you prevent complicated data issues when you upgrade.
Then, in case of the comment table and forms, the option string and the captions are different on the forms, so in addition to the option value in the table, you also need to modify the option caption on the form. I don't know exactly what it is that you have to change, but it's in the variable that the option box it tied to on the form. Make sure that the form's option value is tied to your new option in the table. Browse around in the form code and you should find it in there.
If you don't have access to the C/AL code on forms, then you need to have your solution center do this particular one.0 -
The option Value isnt on my form its in the record. Take a look at how the Purchase Orders do this. When you open the form the form links to the Purchase header table but is filtered on "Order" type. So when you insert a new record it creates it with this Document type automatically.
So I have a copy of the Purchase Header table and a copy of the form that links to it. I have changed the "Document Type" In the new tables to include my new option value "Pass-Through Order".
I have told the new form to link to this table and filter on my new option type. I have a copy of the comments button as well thats on the Purchase Orders. This uses the code I pasted above.
So when I insert a new record it does as I expect. When I look at the new record created the Document Type on it is exactly what I wanted it to me.
However when I click on the comments button and insert a comment... and then I look at the created record in the purch. Comment Line table... it has a different Document Type assigned than the record I inserted it against!!
GaMBe0
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