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,
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.
Answers
Enable the Auto-update property on the XML port.
You cant change "Base unit of measure" if the item has ledger entries. This is because all item transactions are based on "base unit of measure". Changing this would mess up with inventory value.
Description should be ok to change.
go to property of yourXML port and give permission "RMID" to table 27.
and then try to upload again.
hope this work.