I have created a new form that sources the Tracking Spec table, I also have a sub form view to Item Tracking that sources the Item Ledger Table.
On this sub form I have specified a button called Navigate that when clicked opens up the posted sales shipment document related to the line the user is focussed on.
Now on the button I defined it to RunObject: Form Posted Sales Shipment and the RunFormLink: No.=FIELD(Document No.)
If I were to run this form by itself the button works correctly and the Posted Shipment card is displayed for the line item. If I run my new form that has this sub form and I click the button I get the following error
"Field No. 6 is not defined in the Tracking Specification table"
Could someone please shed some light on this for me.
Cheers
James
Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.
0
Comments
If the button is on your main form it does not have direct access to the values on the subform, and you need to remove the runformlink property, and in the OnPush of the menuitem something like this:
CurrForm.NameOfSubForm.FORM.GETRECORD(lrRecordOfTypeThatIsDisplayedOnTheSubform);
Now you have a record variable relating to eh current record on the subform.
Then you can call the Posted Shipment form and send in the record variable...
Hope that makes sense,
-a
Thanks for the reply.
The button is actually on the sub form.
Jim
"Field No. 6 is not defined in the Tracking Specification table"
In base Navision there is no field 6 for this table, something you are using (one of the two forms) is referencing this field (maybe it was added then removed?).
Try compiling the main form and see if the complier gives you the same message. This error is telling you that an event / trigger somewhere is referencing a field that doesnt exist. But it would have had to exist at some point for the object to originally compile...
-a
The button is defined on the sub form, and when this sub form is run independently from the main form the button works fine. But when I define the form to be a sub form of the main form the button does not work.
What about the Tracking Specification table, is there a field # 6?
I've spent hours looking with other developers for the solution and did not find it.
My conclusion is NAV cannot work correctly with buttons on a subform which use Runobject and RunFormLink.
My is opinion is that you should not want to use buttons on a subform. [-X
And because deleting the buttons from the subform was not allowed ,I've solved it by making a function for showing related records.
Tino Ruijs
Microsoft Dynamics NAV specialist
I don;t agree 100% - but when you try to copy buttons from 1 form to another, instead of creating it new, you will sometimes fall into some unforseen complications due to previous coding or property setups that do not apply to your new form
http://www.BiloBeauty.com
http://www.autismspeaks.org