mibuso.com

Microsoft Business Solutions online community
It is currently Fri May 24, 2013 7:54 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Item No. cant rename
PostPosted: Thu May 24, 2012 12:20 pm 
Offline

Joined: Tue Jun 14, 2011 7:26 am
Posts: 10
Country: India (in)
Hi,
While item no. renamaing, i am getting the error message.
The following field must be included in the table's primary key:
Field: "Description"
Table: "Item"


Top
 Profile E-mail  
 
 Post subject: Re: Item No. cant rename
PostPosted: Thu May 24, 2012 1:21 pm 
Offline

Joined: Mon May 18, 2009 6:36 am
Posts: 792
Location: India
Country: India (in)
Check the primary key of item table. while renaming the item you must give new value for all primary key fields.

_________________
Vijay Gupta
Changing the code is last step. Try to change processes first...


Top
 Profile E-mail  
 
 Post subject: Re: Item No. cant rename
PostPosted: Thu May 24, 2012 4:33 pm 
Offline

Joined: Thu Oct 30, 2008 10:38 am
Posts: 987
Location: Earth
Country: Netherlands (nl)
Don't modify your Item table's primary key.
Check any customisation that includes an update of the description field in oninsert/modify/delete/rename trigger.
Description should not be modified when renaming an item.

_________________
|Pressing F1 is so much faster than opening your browser|
|MCBMSS: 5.0 intro|MCTS:NAV09 839..841|JetReports© Certified Specialist|
|Dynamics Anywhere: Mobile Business Solutions|


Top
 Profile  
 
 Post subject: Re: Item No. cant rename
PostPosted: Tue May 29, 2012 5:14 pm 
Offline

Joined: Wed May 02, 2012 10:21 am
Posts: 33
Country: Vietnam (vn)
dhakshnamoorthy wrote:
Hi,
While item no. renamaing, i am getting the error message.
The following field must be included in the table's primary key:
Field: "Description"
Table: "Item"


You tried changing the primary keys. It's not recommended to do that so firstly you have to know they reason why they have that primary key or ask which one sets it. So discuss if we can remove it or use another way to work with your current task :)


Top
 Profile E-mail  
 
 Post subject: Re: Item No. cant rename
PostPosted: Tue May 29, 2012 5:29 pm 
Offline

Joined: Fri May 18, 2012 3:04 pm
Posts: 148
Location: Armenia, Quindio
Country: Colombia (co)
This sounds like you have a field in another table that has a table relationship to the Description field on the Item table without also a link to the No. field so as it looks for links to rename it is trying to do a rename on this field as well as the link is setup as if teh Description field is the primary key.

_________________
Gerry Kistler
KCP Consultores


Top
 Profile E-mail  
 
 Post subject: Re: Item No. cant rename
PostPosted: Tue May 29, 2012 11:16 pm 
Offline

Joined: Mon Mar 30, 2009 12:54 pm
Posts: 74
It seems that some body has customized the table and primary key of item table. Please remember not to change the primary key of a standard table ever. Try to rename the item in crounus database and see what have you changed wrongly in the item table primary key.

BR ,


Top
 Profile E-mail  
 
 Post subject: Re: Item No. cant rename
PostPosted: Wed May 30, 2012 12:09 am 
Offline

Joined: Fri May 18, 2012 3:04 pm
Posts: 148
Location: Armenia, Quindio
Country: Colombia (co)
The error received would not be received if the primary key of the item table was changed. The issue in this case is another table with an incorrect table relationship just tied to the Description field with no link to the primary key ("No.") of the item table.

_________________
Gerry Kistler
KCP Consultores


Top
 Profile E-mail  
 
 Post subject: Re: Item No. cant rename
PostPosted: Wed May 30, 2012 2:26 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5315
Location: Prague
Country: Czech Republic (cz)
Actually this is a bug in Navision. The bug was introduced in Ver 1.1 as a part of the upgrade tool kit from Navision DOS to Financials. The bug was there because of the change in primary key in the Object Designer from Object name to object ID number. The bug is that Navision should not allow this link to compile it should allow lookup only on the primary key.

For me this bug is very annoying because it was the first bug I ever reported in the Windows version of Navision and it was never fixed. It can be nearly impossible to find, so its a great way to hide a bomb in Navision. Lets say you have developer access to an add-on in a locked range, simply add a flow field in that table and the customer can never rename an item again.

Gerry is quite right, and has correctly identified the symptoms. To fix it you need either to know what code was written, or you need to export all tables to text and search for a lookup flow field that indexes on Description. It might take five minutes if you know the database, or 4 hours if you don't.

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
 Post subject: Re: Item No. cant rename
PostPosted: Wed May 30, 2012 9:48 am 
Offline

Joined: Sat Oct 08, 2005 11:22 am
Posts: 499
Location: TURKEY
Country: Turkey (tr)
gerrykistler wrote:
This sounds like you have a field in another table that has a table relationship to the Description field on the Item table without also a link to the No. field so as it looks for links to rename it is trying to do a rename on this field as well as the link is setup as if teh Description field is the primary key.


I also think that Gerry is right.

To find where this problem occurs:

    Create a form or report using Field table
    Filter RelationTableNo field with 27
    Filter RelationFieldNo with 3

These are the potential fields that may cause this error. Then check if Item No field relation is not supplied in Table Filter area in this table. If it doesn't exist fill it and try renaming again.

_________________
Ufuk Asci
Pargesoft


Top
 Profile  
 
 Post subject: Re: Item No. cant rename
PostPosted: Wed May 30, 2012 12:28 pm 
Offline

Joined: Fri May 18, 2012 3:04 pm
Posts: 148
Location: Armenia, Quindio
Country: Colombia (co)
Ufuk has identified a great way to find it, just be aware that it is possible you will not find it this way. Only the simple relationships are stored this way in the database - I found this out the hard way by trying to use this exact approach in code to find if a field has a table relationship. If it has any kind of filtering or other complexity in the relationship it will not appear in the Field TableRelationNo or RelationFieldNo and I have yet to find a way to figure this out, other than exporting the objects to text and searching in the text file.

_________________
Gerry Kistler
KCP Consultores


Top
 Profile E-mail  
 
 Post subject: Re: Item No. cant rename
PostPosted: Wed May 30, 2012 1:54 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Aug 14, 2001 7:01 am
Posts: 5315
Location: Prague
Country: Czech Republic (cz)
gerrykistler wrote:
Ufuk has identified a great way to find it, just be aware that it is possible you will not find it this way. Only the simple relationships are stored this way in the database - I found this out the hard way by trying to use this exact approach in code to find if a field has a table relationship. If it has any kind of filtering or other complexity in the relationship it will not appear in the Field TableRelationNo or RelationFieldNo and I have yet to find a way to figure this out, other than exporting the objects to text and searching in the text file.


:thumbsup:

Yes my experience is the same, finding this error in my experience takes either 5 minutes or 5 hours :mrgreen:

_________________
David Singleton
Dynamics NAV Freelancer
Dynamics Book
Go-Live International


Top
 Profile E-mail WWW  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: