But i didn't get the solution for it. only header information is moving not the Line information. I need both information should move in purchase invoice
@ismailthesacrificer1@gmail.com,
Sorry, but major part of you code looks like you just taken it from blender.
And gInsertData function has obvious mistakes. E.dg you use RowNo as parameter but always read data from row no. 1.
Notes to your code:
- you use RowNo as parameter but always read data from row no. 1 as logger says
- values in purchase line should be used from previously created header, not from columns
- purchase line Document Type is missing
- purchase line Line No. is missing
Document type and line.no. are not enough u have to choose the most important thing which is Document No., btw u can also use rapid services in nav2016 and choose the fields u want and whether to validate or not on each one, but the file u import should be excel
Your code can create header and one line. If your Excel has more lines linked to one document no., you have two possibilities:
- divide headers data and lines data into two sheets/files and create loop for import headers and loop for import lines
- you can (theoretically) import data your way, but you have to change code to IF gPurchaseHeaderRec.INSERT(TRUE) THEN ; to avoid attempt to insert the same document twice. Bad message is that this code doesn't differentiate between double inserting and other error in insert trigger.
Comments
WHAT, AGAIN?!
We already discuss it here https://forum.mibuso.com/discussion/70580/can-any-one-suggest-me
I suggest you have a mistake in logic in your code. You can post you code here and we will take a quick look on it.
Sorry, but major part of you code looks like you just taken it from blender.
And gInsertData function has obvious mistakes. E.dg you use RowNo as parameter but always read data from row no. 1.
I was waiting for your reply it will be helpful if you respond.
- you use RowNo as parameter but always read data from row no. 1 as logger says
- values in purchase line should be used from previously created header, not from columns
- purchase line Document Type is missing
- purchase line Line No. is missing
Yes i added purchase line Document Type and Line No.
Can you please evaporate it i didn't understand it, yes its read only one record
- divide headers data and lines data into two sheets/files and create loop for import headers and loop for import lines
- you can (theoretically) import data your way, but you have to change code to IF gPurchaseHeaderRec.INSERT(TRUE) THEN ; to avoid attempt to insert the same document twice. Bad message is that this code doesn't differentiate between double inserting and other error in insert trigger.