Documentation() G/L Entry - OnPreDataItem() G/L Entry - OnBeforeExportRecord() G/L Entry - OnAfterExportRecord() G/L Entry - OnBeforeImportRecord() G/L Entry - OnAfterImportRecord() "Gen. Journal Line".INIT; "Gen. Journal Line".VALIDATE("Journal Template Name","Gen. Journal Line"."Journal Template Name"); "Gen. Journal Line".VALIDATE("Journal Batch Name","Gen. Journal Line"."Journal Batch Name"); "Gen. Journal Line".VALIDATE("Line No." ,"Gen. Journal Line"."Line No." + 10000); IF "Gen. Journal Line".INSERT(TRUE) THEN "Gen. Journal Line".SetUpNewLine("Gen. Journal Line",Balance,FALSE); "Gen. Journal Line".VALIDATE("Posting Date",DateCompt); "Gen. Journal Line".VALIDATE("Document Type","Type Document"); "Gen. Journal Line".VALIDATE("Document No.",FORMAT(DocNum)); "Gen. Journal Line".VALIDATE("Account Type","Gen. Journal Line"."Account Type"::Customer); "Gen. Journal Line".VALIDATE("Account No.","N°Client"); "Gen. Journal Line".VALIDATE("Gen. Journal Line".Description,Désignation); //"Gen. Journal Line".VALIDATE(Amount,Montant); "Gen. Journal Line".VALIDATE("Amount (LCY)",Montant); "Gen. Journal Line".VALIDATE("Document Date","Date Document"); "Gen. Journal Line".VALIDATE("External Document No.","N° Documentf"); "Gen. Journal Line"."Bal. Account Type":="Gen. Journal Line"."Bal. Account Type"::"G/L Account"; Customer.GET("N°Client"); "Groupe Compta":=Customer."Customer Posting Group"; "Customer Posting Group".GET("Groupe Compta"); "Gen. Journal Line".VALIDATE("Bal. Account No.","Customer Posting Group"."Receivables Account"); "Gen. Journal Line".MODIFY(TRUE); DocNum += 1; G/L Entry - OnPostDataItem() ImportDataPar(NomF : Text[250];NomModFeuille : Code[10];NomFeuille : Code[10];DateComptabilisation : Date;"N°Doc" : Code[20]) FileName:=NomF; "Gen. Journal Line"."Journal Template Name":=NomModFeuille; "Gen. Journal Line"."Journal Batch Name":=NomFeuille; DateCompt:=DateComptabilisation; "N° Document":="N°Doc";
Comments
I don't understand why...can't that be the source of the errors??????
Regards,
Faisal Bukhari
Isn't the validation taking place in the Dataport code???
Change your dataitem to the correct one & re-try your code.
Note: The best way to see if a dataport is working correctly is to manually enter a line into the journal, filling in the info you normally do. Then you can look at the table and see all the fields that get filled.
When you run your dataport all the same fields should be filled else your dataport is missing something.
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://msdn.microsoft.com/en-us/library/dd301300
Read more about dataports in the application designers guide. (w1w1adg.pdf)
http://www.microsoft.com/en-us/download ... x?id=24432
If it's just an exercise for 2009 - the best answer would be to delete the dataport & start learning XML ports.
http://www.BiloBeauty.com
http://www.autismspeaks.org
For a dataport you need to just select the table you want to import into.
Map the fields to match your incoming data.
Manipulate the data if needed during import.
No Dataitemviews or stuff like that needed. That's more for a form.
http://www.BiloBeauty.com
http://www.autismspeaks.org
It's for importing credits so if you build this one & run the data - then view the results it might give you an idea on how the dataport works. Good luck
https://docs.google.com/document/d/1ESb ... PeQwM/edit
http://www.BiloBeauty.com
http://www.autismspeaks.org