Good day everyone,
I am creating a dataport for importing Vendors invoces.
As I realized it is better to do through importing (38)Purchase Header and (39)Purchase Line. Since our client has only one product to sell Purchase Line information is always the same which is:
Document Type - Invoice
Line No. - 10000
Type - Item
No. - CE
Description - CE
Quantity -1
I believe I can create one dataport through Purchase Header and assign through C/AL code Purhcase Line functions to it.
Unfortunately all functions I tryed so far failed. Can you advise me anything? How can I created required dataport.
Thank you
Vesna
0
Comments
onpredataport tigger
here PH is Purchase header record
enjoy!its ur lucky day
GD
There is a way how I did it.
Myabe for some one it would be useful too.
PurchaseHeaderRec.INIT;
PurchaseHeaderRec."Document Type":=PurchaseHeaderRec."Document Type"::Invoice;
PurchaseHeaderRec.VALIDATE("No.", NO);
PurchaseHeaderRec.VALIDATE("Buy-from Vendor No.", VEN);
PurchaseHeaderRec.VALIDATE("Vendor Invoice No.", VIN);
PurchaseHeaderRec.INSERT(TRUE);