Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Lines are coming double

(0) ShareShare
ReportReport
Posted on by 3,099

Hi

  I have below code but there are 2 line for Import. It is importing 4 . Blank for each record

Gen. Journal Line - OnAfterImportRecord()

"Journal Template Name" := 'GENERAL';
"Journal Batch Name" := 'TEST';
"Line No." := GetLineNo;

GetLineNo() : Integer
GenJnlLine.SETRANGE("Journal Template Name",'GENERAL');
GenJnlLine.SETRANGE("Journal Batch Name",'TEST');

IF GenJnlLine.FINDLAST THEN
EXIT(GenJnlLine."Line No." + 10000)
ELSE
EXIT(10000);

Posting Date	Document Type	Document No.	Party Type	Party Code	Account Type	Account No.	Description	External Document No.	Vendor Invoice Date	Service Tax Amount	Debit Amount	Credit Amount	Basic Amount For GST	HSN/SAC/Service Tax Group Code	HSN/SAC/Service Tax Entry	HSN/SAC/Service Tax Registration No.	HSN/SAC/Service Tax Base Amount	Type of Inward Supply	RCM Document No.	Ethos Location	Location of Recipient	Vendor Location	CGST Amount	UTGST Amount	IGST Amount	SGST Amount	TDS Nature of Deduction	TDS/TCS Base Amount	Total TDS/TCS Incl. SHE CESS	Mannual TDS	Bal. Account Type	Bal. Account No.	Currency Code	Store Code	Brand Code	HSN/SAC/Service Tax	Mannual Service tax	HSN/SAC/Service Tax Amount	Consignment Note No.	TDS/TCS %	TDS/TCS Amount	Vendor Invoice Date	Amount
31/01/2018	Credit Memo	15	Vendor	V01	Vendor	V01	Abc	HR	09/01/2018	600.00	5,400.00		0	6208	Yes	N\A	5400.00	Inputs		MAH	PUN	DLH	0	0	270.00	0	CO 2%	0	0	No	G/L Account	5004		HR		0	No	270.00		0	0	09/01/2018	5400.00
31/01/2018	Credit Memo	15	Vendor	V01	Vendor	V01	ABC	HR	09/01/2018	400.00	6,000.00		0	6201	Yes	N\A	6000.00	Inputs		MAH	PUN	DLH	0	0	300.00	0	CO 2%	0	0	No	G/L Account	5004		HR		0	No	300.00		0	0	09/01/2018	6000.00

Thanks

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Lines are coming double

    We need to know:

    1) the format of your file that you're importing in NAV (TXT, CSV, what are separators?)

    2) The definition of your dataport fields

  • Hannes Holst Profile Picture
    5,767 on at
    RE: Lines are coming double

    The problem is probably in the setup or structure of your Dataport.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans