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
0
Comments
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.
RIS Plus, LLC
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!!
GaMBe