Renaming record

Samson
Member Posts: 42
Hi all,
I have created new table with following fields
FIELDS
{
{ 10 ; ;Customer No. ;Code20
;TableRelation=Customer }
{ 20 ; ;CRM Company Contact No.;Code20
;TableRelation=Contact }
{ 30 ; ;Type ;Option
;OptionCaptionML=ENU=" ,AE,AM,Buyer";
OptionString=[
,AE,AM,Buyer] }
{ 40 ; ;Global Dimension 1 Code;Code20
;TableRelation="Dimension Value".Code WHERE (Global Dimension
No.=CONST(1));
CaptionClass='1,1,1'
}
{ 50 ; ;Code ;Code10
;TableRelation=Salesperson/Purchaser.Code WHERE (Type=FIELD(Type)) }
{ 60 ; ;Name ;Text30
;FieldClass=FlowField;
CalcFormula=Lookup(Salesperson/Purchaser.Name WHERE (Code=FIELD(Code)))
}
and with following Primary Key
{Customer No.,CRM Company Contact No.,Type,Global Dimension 1
Code,Code}
I have existing records with blank in field "Code"
When I want to change value of Code Field from blank to other(for ex.
JR) I have got confirmation message Do you want to Rename record? , and
when I select Yes following Error message is appear
###################################################
Microsoft Business Solutions-Navision
You cannot rename a record because the old value of the field below is
'',
Field: Code
Table: Salesperson Assignment by Vendare Company
OK
###################################################
Any assistance?
Thanks,
Samson
I have created new table with following fields
FIELDS
{
{ 10 ; ;Customer No. ;Code20
;TableRelation=Customer }
{ 20 ; ;CRM Company Contact No.;Code20
;TableRelation=Contact }
{ 30 ; ;Type ;Option
;OptionCaptionML=ENU=" ,AE,AM,Buyer";
OptionString=[
,AE,AM,Buyer] }
{ 40 ; ;Global Dimension 1 Code;Code20
;TableRelation="Dimension Value".Code WHERE (Global Dimension
No.=CONST(1));
CaptionClass='1,1,1'
}
{ 50 ; ;Code ;Code10
;TableRelation=Salesperson/Purchaser.Code WHERE (Type=FIELD(Type)) }
{ 60 ; ;Name ;Text30
;FieldClass=FlowField;
CalcFormula=Lookup(Salesperson/Purchaser.Name WHERE (Code=FIELD(Code)))
}
and with following Primary Key
{Customer No.,CRM Company Contact No.,Type,Global Dimension 1
Code,Code}
I have existing records with blank in field "Code"
When I want to change value of Code Field from blank to other(for ex.
JR) I have got confirmation message Do you want to Rename record? , and
when I select Yes following Error message is appear
###################################################
Microsoft Business Solutions-Navision
You cannot rename a record because the old value of the field below is
'',
Field: Code
Table: Salesperson Assignment by Vendare Company
OK
###################################################
Any assistance?
Thanks,
Samson
0
Comments
-
You have to write a routine that deletes the record and inserts with the correct info. Or do it manually. Delete the record and insert again.0
-
I knew about delete-insert, but not wanted to use that way.
BUT now as there isn't any other way, necessarily I'll be use delete/insert
Thanks for your helps.
Samson0 -
Assuming this is a one time thing, I can see two possible scenarios:
Depending on how many records you have, you could set this up as a dataport, export the recs, work on them outside of Navision, and import back to the table (after deleting the recs that you exported).
You could also create another field called EntryNo, fill it in with a unique integer for each record, then change the primary key for the table to EntryNo, make your changes, set the primary key back to the default, and delete and remove the EntryNo field.There is no data, only bool!0
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