Navision questions! need answer plz

RKM
Member Posts: 26
1.Trying to reduce the item description length from 55 character to 50
In the table we have no records above 50 chracters.
when I make the change I get the following error
"You cannot delete or chage this type of the description field(in teh item table) before the value of teh field is "" or 0 This error occured due to a non zero value was found for the record No. 100001" in company development
How can i change this.
2Is there an easy way to set a combo box on a form to a default value everytime and on any preexisitng items set the combo if it has a null vlaue to a default value(default value="STANDARD")
Thank you
RKM
In the table we have no records above 50 chracters.
when I make the change I get the following error
"You cannot delete or chage this type of the description field(in teh item table) before the value of teh field is "" or 0 This error occured due to a non zero value was found for the record No. 100001" in company development
How can i change this.
2Is there an easy way to set a combo box on a form to a default value everytime and on any preexisitng items set the combo if it has a null vlaue to a default value(default value="STANDARD")
Thank you
RKM
0
Comments
-
1. Copy content of description field to the other field (description 2 or a new one). You can use Navision report or other tool ( I prefer SQL Query Analyzer). Clear up description field content. Decrease the size to desired and copy description back from the other field.0
-
Hi RKM
1. u get this error because u have data already on the table for the field u are trying to change the field length..do as suggexted by dimitrix
2. To set a value for combo box as default, u have to program on the required trigger, as and when u want the default value to aapear on the comboLife has just started!! Program it well !!0 -
Standard Cost - OnValidate
// Please note that when any code changes are made to this trigger the same code changes must be
// made to fStdCostOnValidate function at the bottom of this table.
//add this to the OnValidate
lvCuStdCost.fUpdateWithCostComponents(xRec, Rec);
Create a new Local Function called "fStdCostFieldOnValidate"
//fStdCostFieldOnValidate
//>>NEW CODE BEGIN
IF ("Costing Method" = "Costing Method"::Standard) AND (CurrFieldNo <> 0) THEN
IF NOT CONFIRM(Text020 + Text021 + Text022,FALSE, FIELDCAPTION("Standard Cost"))
THEN BEGIN
"Standard Cost" := xRec."Standard Cost";
EXIT;
END;
ItemCostMgt.UpdateUnitCost(Rec,'','',0,0,FALSE,FALSE,TRUE);
//<<NEW CODE END0 -
Hi guys thanks for all your responses
dmitrip--Thanks this worked, I didnt want to touch the SQL part of things as navision is quite touchy on things when you take the sql server approch. But your solution worked.
ajay_setin & Stefan Verwey
Stefan Your code worked great, I was curious as to there might be other methods of doing this using the designer, as im new to navision and am finding a couple of solutions to 1 problem
Thanks again
RKM0
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