I am trying to import products from an excel-sheet. Everithing is going well except for writing into pricelist (information register).
Code
Reg = InformationRegisters.PriceList.CreateRecordManager();
Reg.Product = NewProduct.Ref;
NewPrice = ExcelApp.Sheets(CurrentNumber).Cells(NRows,NColumns +3).Value;
Period = ExcelApp.Sheets(CurrentNumber).Cells(NRows,NColumns +5).Value;
Reg.Period = Period;
Reg.Price = NewPrice;
Message(Period); // this message is just to see that date is readed correctly, it is
Reg.Write(True);
What is wrong? Thank you in advance for any suggestion!