Renaming of Customer No.
Thomas_Hviid_Thorn
Member Posts: 92
Hej 
For a customer we have 2 databases (both NAV 2009, SQL 2005), one for development and one for testing.
In both databases we have the following table:
From the customer, we got the error, that they could not rename a customer.
To make a long story short, in Development we got everything working. No problem at all renameing customers.
I out Test-database the table above shows up with an error:
Do anyone have an idea, what is wrong in one database, but not in the other? ](*,)
For a customer we have 2 databases (both NAV 2009, SQL 2005), one for development and one for testing.
In both databases we have the following table:
OBJECT Table 99240 Customer DSL Status Log
{
OBJECT-PROPERTIES
{
Date=22-10-09;
Time=14:37:16;
Version List=TB023;
}
PROPERTIES
{
LookupFormID=Form96700;
DrillDownFormID=Form96700;
}
FIELDS
{
{ 1 ; ;Customer No. ;Code20 ;TableRelation=Customer.No.;
Editable=No }
{ 2 ; ;Entry No. ;Integer ;AutoIncrement=Yes;
Editable=No }
{ 4 ; ;PFC No. ;Code20 ;TableRelation=IF (Progress=FILTER(Initiated|Started)) "PFC Header"."PFC Nr."
ELSE IF (Progress=CONST(Finished)) "Posted PFC Header"."PFC Nr.";
Editable=No }
{ 5 ; ;Type ;Option ;OptionString=Suspended,Resumed,Terminated;
Editable=No }
{ 6 ; ;Who ;Code20 ;Editable=No }
{ 7 ; ;When ;DateTime ;Editable=No }
{ 8 ; ;Progress ;Option ;OptionString=Initiated,Started,Finished,On Hold,Error }
{ 9 ; ;Automatic ;Boolean ;Editable=No }
{ 10 ; ;Closed ;Boolean }
{ 11 ; ;Referring Entry No. ;Integer }
{ 100 ; ;Case No. ;Integer }
}
KEYS
{
{ ;Customer No.,Entry No. ;Clustered=Yes }
{ ;Type,Progress,Closed,Automatic }
{ ;Progress }
{ ;Entry No. }
}
FIELDGROUPS
{
}
CODE
{
BEGIN
{
****************************************************
New Created for Deb.-Management Reminder Solution
****************************************************
}
END.
}
}
From the customer, we got the error, that they could not rename a customer.
To make a long story short, in Development we got everything working. No problem at all renameing customers.
I out Test-database the table above shows up with an error:
The following field must be included in the table's primary key.
Field: When
Table: Customer DSL Status Log
Do anyone have an idea, what is wrong in one database, but not in the other? ](*,)
With Kind Regards
Thoms Hviid Thorn
Thoms Hviid Thorn
0
Comments
-
Sound like you have diffrent Primary key in both database but use the same Rename code. Did you debug it?
What is your code for rename?0 -
Thanks for the input: but no, it's the same object in both databases!
The rename is done by opening the Customer Card (form 21) and changing the Customer."No." field
- as simple as can be (Numberseries is setup to allow this).
The code on the OnRename-trigger on T18 is the same in both databases, and does not include T99240, that causes the trouble.With Kind Regards
Thoms Hviid Thorn0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions