E9.2 Change the Primary Key of a custom table

Vidushi

Vidushi

Member
Hi,

There are bunch of custom tables having 2nd Item number (LITM) as a primary Key but now client wants to replace 2nd item number with Short Item Number(ITM). I don't think its a good Idea to replace the Primary key with ITM because then I need to check what all places these tables are getting used means all the Inserts, Updates, Selects and Fetches.
There are total 9 custom tables. Some tables have one other column also in the primary key with LITM.
What all things I need to take care if I change the Primary Key apart from all queries (Inserts, Updates, Selects and Fetches) used in any of Reports and applications??

Thanks in advance
 
Rauf

Rauf

VIP Member
Is there any specific reason for this request from the client ? Has this any effect on business ?
One way is to mimic the ITM as the key even if it is not the key. You can just check for a duplicate ITM during the database operations ( insert, update, delete and select) and set an alert for the client.
This way you can avoid changing all the primary keys across the nine table and associated reports and applications.
 

Stank1964

Active Member
Anyone that knows anytihng about how JDE does its' work would agree that that was a terrible design initially. That probably plays into why there is a request to change it now. The application, out of the box, supports updates to LITM. That's a clue about how good of a candidate LITM is for a unique primary key.
 
Top