Hi Friends,
I have designed a dataport to import Item No., Entry Type, Quantity, Location Code from CSV file. After importing the following fields will get imported in the Item Journals. While posting, say for example, Item A is only 10 nos. in the inventory. But when I try to post 15 nos., normally it pops up with a screen saying the warning that only 10 is there, but you are posting 15. Do you want to post it now? But after importing the records from CSV file, this warning screen is not popping up. Can any please help me how to solve this?
I know that, I need to use the VALIDATE function. but still it is not working.
Item No., Entry Type, Quantity, Location Code are the dataport fields. (Those fileds will be the excel sheet)
I wrote the below coding in Item journal Line - OnAfterImportRecord()
IF xItemNo <> ItemNo THEN BEGIN
WITH ItemJournal DO BEGIN
VALIDATE("Line No.", LineNo);
VALIDATE("Journal Template Name", 'ITEM');
VALIDATE("Journal Batch Name", 'DEFAULT');
VALIDATE("Source Code", 'ITEMJNL');
VALIDATE("Document Date", Date1);
VALIDATE("Posting Date", Date1);
DocumentNo1 := FORMAT(Date1,0,'<month,2><day,2><year>') + DocumentNo;
VALIDATE("Document No.", DocumentNo1);
VALIDATE("Item No.", ItemNo);
VALIDATE(Quantity, Quan);
VALIDATE("Entry Type", EntryType);
VALIDATE("Location Code", Location);
INSERT(TRUE);
END;
END;
xItemNo := ItemNo;
Comments
http://mibuso.com/forum/viewtopic.php?f ... 53#p246853
When you manually enter a item in the journal, do you always set the entry type last as in your code?
Wouldn't you set the entry type before the item no and the qty.
In your code order at the time of qty validation the system doesn't know if it's a positive or negative adjustment.
Try setting the item no and qty last.
Also as a true test to see if your data port is workin correctly, after importing with data port also enter a line manually. Then in object designer view the table and see if all the fields that get filled with the manual entry also get filled on the data port import line.
If the don't match you need to correct the data port deficiency
http://www.BiloBeauty.com
http://www.autismspeaks.org
I have tried that too. But its not working... :-(
If I give Item No. before Entry Type it is showing a message saying, "You must specify No. in Item No. ="
Thanks for your reply. But it is not working... :-(
but that's what you are doing in your code
did your try type->item no-> qty?
http://www.BiloBeauty.com
http://www.autismspeaks.org