Better Method to change to Unit Price?

slmaluwa
Member Posts: 366
Hi all
We have NAV 4 SP3 with Native DB.
We have around 9,000 selling items in the Item Card and our selling unit price changes few times a year.
Currently, I have a DataPort to import a CSV file with "No." and "Unit Price" fields. No coding involved. Just plain simple Data Port. In this method, I think that NAV just take each line from the CSV file, find "No." and replaces BOTH fields. If a code is not found, it is created. Is this correct?
What would be most appropriate automated way of updating Unit Price?
If the code is not found, I don't want to create a new item. I just want to through an exception or warning message.
I am sure that I am not alone and many of you must have already been using better methods to change the prices frequenty.
Thank you in advance
Maluwa
We have NAV 4 SP3 with Native DB.
We have around 9,000 selling items in the Item Card and our selling unit price changes few times a year.
Currently, I have a DataPort to import a CSV file with "No." and "Unit Price" fields. No coding involved. Just plain simple Data Port. In this method, I think that NAV just take each line from the CSV file, find "No." and replaces BOTH fields. If a code is not found, it is created. Is this correct?
What would be most appropriate automated way of updating Unit Price?
If the code is not found, I don't want to create a new item. I just want to through an exception or warning message.
I am sure that I am not alone and many of you must have already been using better methods to change the prices frequenty.
Thank you in advance
Maluwa
"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
0
Answers
-
You can use sales price worksheet.
If you need a proper dataport let me know.0 -
hi Ara3n
I sent you a PM for this dataport and no reply.
Can you please share this data port with me?
Regards
Maluwa"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
Here is the Dataport.
OBJECT Dataport 50000 Example Import Price { OBJECT-PROPERTIES { Date=01/16/08; Time=[ 7:55:51 AM]; Modified=Yes; Version List=MOD01; } PROPERTIES { FieldStartDelimiter=<None>; FieldEndDelimiter=<None>; } DATAITEMS { { PROPERTIES { DataItemTable=Table2000000026; AutoSave=No; AutoUpdate=No; AutoReplace=No; DataItemTableView=SORTING(Number); OnBeforeImportRecord=BEGIN CLEAR(Column); END; OnAfterImportRecord=BEGIN FOR I := 1 TO ARRAYLEN(Column) DO BEGIN Column[I] := DELCHR(Column[I],'<>',' '); END; IF Item.GET(Column[1]) THEN BEGIN EVALUATE(Item."Unit Price",Column[2]); Item.VALIDATE("Unit Price"); Item.MODIFY(TRUE); END; END; OnPostDataItem=BEGIN COMMIT; END; } FIELDS { { ; ;Column[1] } { ; ;Column[2] } { ; ;Column[3] } { ; ;Column[4] } { ; ;Column[5] } { ; ;Column[6] } { ; ;Column[7] } { ; ;Column[8] } { ; ;Column[9] } { ; ;Column[10] } { ; ;Column[11] } { ; ;Column[12] } { ; ;Column[13] } { ; ;Column[14] } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } CODE { VAR Column@1000000000 : ARRAY [50] OF Text[100]; I@1000000001 : Integer; Item@1000000002 : Record 27; BEGIN END. } }
0 -
Thank you Rashed
But, can you please explain a bit on how this works? and what format the price list file should be in?
I try to export and it started to loop through a number in negative.
Thank you
Maluwa"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
Yeah don't use the export.
It's coma separate file with Item no as first column and Unit price as second column0 -
Report 794 Adjust Item Costs/Prices
or
Report 791 Suggest Item Price Changes0 -
The reason for the following code is to remove leading and trailing empty spaces.
FOR I := 1 TO ARRAYLEN(Column) DO BEGIN Column[I] := DELCHR(Column[I],'<>',' '); END;
0 -
hi Ara3n
In this case, you have used this code to get the price (numbers without trailing spaces)
When we modify it to process TEXT/Option fields, is it necessary to remove it?
One other confusion is, when it comes Option field, i heard that NAV stores them as Numbers. But, when we import them from TEXT files, do we have to create them as TEXT (option Strings) or numbers?
Thank you"A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."0 -
You can keep it for options. Keep the value as Text for options
when you are populating the table, you need to evaluate it
evaluate(Item."Costing Method",Dataitem[5]);
item.validate(Item."Costing Method");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