Hello community, I have created a custom page ("WHT Transaction") as shown in Fig 1. Some of the field in this custom page is filled from "Payment Journal" page and the rest are being filled by another custom table. After filling all the values in "WHT Transaction" I want to put all the values again in the "Payment Journal" using "Post WHT" action as shown in fig 1. For doing so, I have to get the three primary keys of "Payment Journal" i.e. "Journal Template Name", "Journal Batch Name" and "Line No.". I have created two fields in "Sales & Receivales Setup" ("End of billing cycle template" and "End of billing cycle batch") having table relation with "Gen. Journal Template" and "Gen. Journal Batch" respectively as shown in fig 2 and fig 3. Now in fig 4 I'm getting the three primary keys; two from "Sales & Receivales setup" and one using .GetNewLineNo. method present in "Gen, Journal Line" table. Now the thing is that when I post the values they are not added to the "Payment Journal" new line. The reason is shown in fig 1 and fig 5, in fig 5 the line no. for first line is 10000 and for second line it should be 20000 but in fig 1 the line no. I'm getting is 210000. The reason behind this is that I have run this multiple time so the line no. started from 20000 has become now 210000. Now can anyone tell me that how can I start from line no. 20000.




