Sub Form button error : Field No. 6 is not defined

hairyjim
Member Posts: 99
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
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
-
Is the button on your subform, or did you copy it onto your main form?
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,
-a0 -
Hi,
Thanks for the reply.
The button is actually on the sub form.
JimGive a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.0 -
OK Sorry I read the error incorrectly.
"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...
-a0 -
Hi.
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.Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.0 -
Did you re-compile both forms?
What about the Tracking Specification table, is there a field # 6?0 -
I just recently bumbed into the same message.
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 specialist0 -
when running into a situation like this i generally export both objects to text and then have a search for the thing that goes wrong0
-
tinoruijs wrote:My is opinion is that you should not want to use buttons on a subform.
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 form0
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