Quantcast
Channel: NAV/Navision Classic Client — mibuso.com
Viewing all articles
Browse latest Browse all 2230

Can't modifiy item because have item ledger entries

$
0
0
Hi everyone,

I've a xmlport to import/export my item list and some other info and I'm usng this to create / modify items between stores because is a very easy way of doing it instead of packages which takes more time.

So my xml port,

yfca89pkhlea.png


OnPostXMLport()
IF (Inserted > 0) OR (Modified > 0) THEN
MESSAGE(FinalMsg, Inserted, Modified);

BarCodes - Export::OnPreXMLItem()
ItemBarcode.RESET;
ItemBarcode.SETRANGE("Item No.", Item."No.");
IF ItemBarcode.FINDSET THEN
BarCodes.SETRANGE(Number, 1, ItemBarcode.COUNT)
ELSE
currXMLport.BREAK;

BarCodes - Export::OnAfterGetRecord()
IF BarCodes.Number = 1 THEN
ItemBarcode.FINDFIRST
ELSE
ItemBarcode.NEXT;

Barcode := ItemBarcode."Barcode No.";

BarCodes - Import::OnAfterInitRecord()

Barcode - Import::OnAfterAssignVariable()
ItemBarcode.RESET;
IF NOT ItemBarcode.GET(Barcode) THEN BEGIN
ItemBarcode.INIT;
ItemBarcode."Barcode No." := Barcode;
ItemBarcode."Item No." := Item."No.";
ItemBarcode.INSERT(TRUE);
END;

And when I import in some stores I get the error message that item x have already item ledger entries and my process of importing is terminated. I need to "force" the modificiation already because I need to change some descriptions and base unit of measure and the system is not allowing me with my xmlport.. I don't know what kind of validation or code I need to add can you help pls?

In my xmlport I've removed the "validation" part of fields.

Viewing all articles
Browse latest Browse all 2230

Latest Images

Trending Articles



Latest Images